The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Hack for [IMG] tag in posts so that guests must register to view imbedded images
Hi all,
I have a hack that I'd like to see, and I'm hoping that it actually wouldn't been to difficult to implement. I'm looking for a hack that would allow an Admin the ability to "flip a switch" and make it so that any posts which include imbedded images (using the [IMG] tag) would be disabled for guests. Ideally, this would be a forum permission that could apply to certain forums only, at the Admin's choice. Instead of guests seeing the images within a post (as you normally would) they could see either: 1. A Replacement graphic that says something along the lines of "In order to view this image, you need to register." 2. Or any custom text (via a template) that would say the same thing: ""In order to view this image, you need to register. Click here to register." etc. This could be a way to save bandwidth and bump up the amount of registered users. Seems like it would be nice hack. Is there already a similar hack out there, or does someone want to tackle this one? |
#2
|
||||
|
||||
Anyone want to take on this one?
Pretty please? |
#3
|
||||
|
||||
Anyone? Bueller??
|
#4
|
|||
|
|||
Great Idea
And also it will help to incarege the visitors to register in my forum Any body can do it ??? |
#5
|
||||
|
||||
I'm still really interested in this hack, and it looks like there's other interest from at least kuwaitsun as well. Anyone want to take this one on?
Mist has created this nice hack which works with the PHP vb code tag in messages, but he's a bit busy to take this IMG hack on. For admins who host a lot of images in posts, this seems like an excellent way to reduce bandwidth AND get new registered users. Ideally, I'd like to see it be able to have an ON/OFF toggle per certain forums, so it would be easy for Admins to decide which forums get the treatment of this hack, without having to alter more templates, etc. I'll be happy to create the graphic(s) needed to show the "Sorry, you must register before you can view this image." graphic, etc. |
#6
|
||||
|
||||
Try this:
Open admin/functions.php, look around line 884 for this line: PHP Code:
PHP Code:
That should do the job. |
#7
|
||||
|
||||
Lesane, thanks for the reply.
I tried the suggested hack, but it didn't work. After applying your hack suggestion, any thread would view as a completely blank page. I don't just mean the contents of the post, but a total white page in the browser. (No header, no forum home, nada.) It would be a blank browser page for forum home, everything, not just individual threads. I double-checked, and made sure I was applying this hack to admin/functions.php (and not admin/adminfunctions.php), double-checked my suggested link to the replacement image (customized for my forum) and again, a total blank page. I'm using 2.3.0 if that helps. Lesane, were you able to get this working in a test? I'd really love to get this working, so please let me know if there's anything I'm missing. Thanks again for the help and suggestion. |
#8
|
||||
|
||||
I did tested it on 2.3.2 but it should not give you a completely blank page even if it isn't working. But 2.3.0 does have a different line so try again:
(redo last one) Open admin/functions.php and find: PHP Code:
PHP Code:
|
#9
|
||||
|
||||
Lesane, it worked like a charm!!
Thank you so much!!! But I did figure out what was causing the entire forum to be blank. 1. In the hack you suggested, at the end, there was an extra "}" character which caused the site to show up as blank. That one extra character was the issue for my board. Removing the extra "}" at the end of the replacement code did the trick!! Wow, thanks again for taking the time to generate this great little hack. You may want to post this hack in the hacks forum, because I'm sure others will get some use out of it. (Just to note, vB3 is odd with the Mac/Safari/IE for Mac. I had to copy/paste using a PC to get the true PHP code without any extra added characters.) So I'm going to save this as a separate TXT attachment just in case. Lesane, thanks again for the help with this! Awesome! |
#10
|
||||
|
||||
You're welcome, glad it's working now.
And to be honest.. i don't know what that extra } is doing there hehe, i cut-n-paste it. Aah well, it's working now. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|