The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Need help with this
Hii,
I used HTML in Forum title field to display a image. (I must use it in title and not in description). Say I used this code:- HTML Code:
<img src="images/forumlogos/8.gif" align="left" border="0" alt="" hspace="5" />Forum title
It works just perfect and I am able to achieve what i want. BUT one thing I don't like is that the image is even displaying in the category strip (in the tcat) while viewing that forum, which is stretching it and making it look very bad. SO, how do I block the HTML part to show in the tcat? and allow only the text i.e. Forum title. There's got to be some way to do it. Thank you |
#2
|
|||
|
|||
How about using plugin to inject the img tag into the output instead of inserting the tag in forum title? Or even customize the specific forum listing template. That way the image will appear exactly where you want it to be instead of wherever the forum title is displayed (one can never know all the places the forum title is displayed -- archives, RSS, thread subscription emails? *shivers*) ...
|
#3
|
||||
|
||||
Thanks for your reply recom!
But I need more info please. Give me some idea of how the plugin code would look like and what hooks to use, i am new to this! Thanks |
#4
|
|||
|
|||
Add a plugin with hook location: forumbit_display
The code: Code:
$forum['title'] = '<img src="images/forumlogos/'.$forum['forumid'].'.gif" onerror="this.style.display=\'none\';" /> '.$forum['title']; Then upload the forum logos into your images/forumlogos directory, with each logo named after the forumid (e.g. if the forumid is 18 then the logo is named 18.gif) Set the plugin as active. (the img tag I included above is special since it automatically handles situations where the logo files are missing by hiding itself) |
#5
|
||||
|
||||
thanks, but I could achieve exactly the same thing editing forumhome_forumbit_level2_post template. But plugin thing saved my edit
I'm getting xhtml validation errors with onerror attribute. And the img tag still exists for all forums where logo files are missing. How do I stop injecting img tag on forums that does not have logo file? Thanks --------------- Added [DATE]1227379492[/DATE] at [TIME]1227379492[/TIME] --------------- alright, I checked for existence of file this way. PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|