Jump to content

crnaovca

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

crnaovca's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i tried this last code above and nothing happened ?? when I go to view image link, I get normal link, not modified src (i changed test with my text) this ?w=400 is something that must be append to URL and I have to strip style part of tag, because I want phpthumb to modify picture width, and not to do it through style tag ...
  2. Maybe problem is that English is not my native language so syntax is wrong. Here is before example: And here is what I want to get: And I want it on all IMG tags in text so all pictures will be same width with doesn't matter wht user uploaded.
  3. For a year or so I have a big problem I have to solve, I HAVE to solve, but still don't know how. Problem at first was in a approach to the problem, and now it is in regex part. Since I am not good at regex at all, and I actually need it only for this one problem, please help me to solve this. In CMS I have WYSWYG editor that gives me source of text like this problem is that I have to change src part to add phpthumb.php in front (full url to phpthumb, not only file name) and in the end of src I have to put "width=400" or similar, 99% width AND must remove style and alt tag ... So solution I have come up is that I have to find somehow all src URLs and then to remove all IMG tags and find replace them with new img tags I create as I want to. Anyone have better idea? Or idea on how to do this I imagined? problem in the end is in whywyg editor that gives me something I cannot change easily. I thing regex would be great to do this and most elegant way on doing it. Problem could be in that I am not sure if img tag look like this <img alt="" src="http://www.site.com/v3/pics/Tuning_2.jpg" style="width: 400px; height: 300px;" /> or <img src="http://www.site.com/v3/pics/Tuning_2.jpg" alt="" style="width: 400px; height: 300px;" /> or <img alt="" style="width: 400px; height: 300px;" src="http://www.site.com/v3/pics/Tuning_2.jpg"/> or somehow else ... ------- to short this up ... how to find all URLs and find replace all img tags with new tags I create as I want to ... (similar topic was here http://www.phpfreaks.com/forums/index.php?topic=229756.0 but since I do not know regex, I don't know how to change this)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.