The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#92
|
||||
|
||||
Aha. Forgot about enabling dynamic URL's in img tags. That did the trick.
Still looking through the templates trying to find where to add the $bburl so that when a user clicks the image they get the full url to sig.php, not just sig.php. |
#93
|
||||
|
||||
Ok, I now have this GREAT hack working in 2.2.5. I seriously recommend more of you check it out - my members are going insane over it
First, thank you Dabean for a great hack. The following are some general instructions for readers of this thread, and a couple minor changes which I hope you will update in your file download. Second, here's what I got to work: Now displays correctly in 2.2.5 img tag safety is working When a user clicks on the image, the correct path gets inserted (suprised no one caught this yet). Works even with php safe mode. First things first, if you are running in safe mode, make sure vb is set to that in the control panel options (duh). Create a directory on your server, preferably OUTSIDE your web root so it's not directly accesable (I used the main directory right above root). Chmod this directory 777. Now enter the full path to it (local path, not http obviously) in your safe mode options. Even though this hack uploads the images to another directory, you still need a safe mode directory where vb will temporaraly store it before it moves it to the correct one. Trust me on this. Next, make sure that in addition to bbcode img tags being enabled on your forums, and set to display in your profile (it defaults to ON, but you never know) you turn Dynamic URL's ON. They aren't by default and a lot of people in this thread missed that. Next, do NOT make the changes suggested earlier in this thread to functions.php! Very important. In a nutshell, starting with 2.2.3 the vb team implimented checks so that only ? or & characters can be used with dynamic URL's, and only if they come from http or https. Problem is, that broke the display part of sig.php - it would only show a link to the image, not the image. The changes suggested earlier got around this, at the expense of security. If you make them, it's possible (I tested) to link to a file on your own server if the person knows the path (getting that is easier than you think - I can't believe the amount of people who still have "display errors" on in their php ini. With that, everytime a script errors on your web server everyone who sees the error will see the full path on your server to the erroring script). THE SAFETY CHECKS DONE IN 2.2.3 AND 2.2.4 that prevented dynamic url's from completly working WERE FIXED IN 2.2.5. So leave functions.php as it is! With 2.2.5 you can use dynamic url's in images (required for this hack) without worrying about some numbnuts trying to execute commands on your server. Make sure the directory you specify for images (don't use the one you use for safe mode) is chmod to 755, or 777 depending on your server. I also highly recommend putting this directory outside of your web-root as well. If you don't, someone feeling clever could possibly discover the file name sigedit.php gives to their uploaded image. They could then link directly to the image, bypassing, for example, the http_referrer checks (it will also bypass sig.php, if you have mod_rewrite setup to deny hot-linking that way). Putting it outside of your web root in a directory sig.php can read from will effectively stop anyone from having any chance of hot-linking. Of course, if you DO want to serve out images, then don't do this Now, you need to make a minor change to your _editsignature template that was added when you first installed the sig. Find: Code:
document.vbform.message.value += "[img]sig.php?imageid="+sigtext+"[/img]" Code:
document.vbform.message.value += "[img]$bburl/sig.php?imageid="+sigtext+"[/img]" This fixes the error where a user clicks on the image they just uploaded to add it to their sig - before, it would add [ img ]sig.php?imageid="1"[ img ] , which of course isn't a valid link Anyway, like I said I have it working just fine with 2.2.5 and my members love it. Thanks again for a great hack. |
#94
|
||||
|
||||
argh! I installed this hack about a month ago, worked like a charm from the get go. But I moved to a new server last week and ever since then I cannot get it to work. This is the error i get:
Warning: Unable to create '/var/www/html/memberspics/uid2iid40.jpg': No such file or directory in /home/virtual/site1/fst/var/www/html/forum/simage.php on line 106 Warning: Unable to move '/tmp/php6oTYq3' to '/var/www/html/memberspics/uid2iid40.jpg' in /home/virtual/site1/fst/var/www/html/forum/simage.php on line 106 pls help? Thanks! |
#95
|
||||
|
||||
Scratch that last post, I fixed it. :alien:
Something was wrong with the directory, even when set to CHMOD 777 I still cannot write to it. So deleted that directory and created another, ever since then it works. Thanks!! |
#96
|
||||
|
||||
Quote:
|
#97
|
|||
|
|||
Quote:
It is for that reason that 2.2.3+ are not supported by this hack as it exists currently. |
#98
|
|||
|
|||
Quote:
My online page shows only links to the sig.php !! Is there a fix??? Or could somebody make a fix?? Please help us and many others who have this problem. |
#99
|
|||
|
|||
Quote:
find PHP Code:
PHP Code:
change PHP Code:
PHP Code:
|
#100
|
|||
|
|||
Quote:
|
#101
|
|||
|
|||
Quote:
The last location is stored in the session table in the "location" field to stop sig.php from appearing you NEED to stop the location field from being updated to contain it, the proposed modification above does just that. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|