vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Making the forum collapse work with PNG's (https://vborg.vbsupport.ru/showthread.php?t=176504)

ssslippy 04-18-2008 08:17 AM

Making the forum collapse work with PNG's
 
Ok anyone have any idea on how to get the forum collapse to work with png's instead of gifs?

nighthalk 04-18-2008 08:34 AM

Quote:

Originally Posted by ssslippy (Post 1493585)
Ok anyone have any idea on how to get the forum collapse to work with png's instead of gifs?

admincp -> Styles & Templates -> Replacement Variable Manager


Then add(Case-Insensitive)
Search for Text -> collapse_tcat.gif

Replace with Text -> collapse_tcat.png


:cool:

ssslippy 04-18-2008 09:33 AM

I have already made the changes to make then PNG images. I should of been more descriptive was multi tasking.

When you change them to a PNG the images do not change upon collapsing and expanding.

Lynne 04-18-2008 02:47 PM

We'd need to see your source code to see why. I can't think of any reason why using a png image would act differently than a gif.

ssslippy 04-19-2008 07:07 AM

Here is the code im using for the collapse code

Code:

                  <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.png" alt="" border="0" /></a>
Here is the tbody tag put in by default by vbulletin.

Code:

<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">

nighthalk 04-19-2008 07:16 AM

You should of left the source code alone and just used the replacement manager as that is why it was put into vbulletin. So you don't have to go directly to the source for such a simple thing.

Lynne 04-19-2008 02:08 PM

nighthalk is right, have you tried reverting the template and using replacement variables instead? (I always forget about that method!!)

ssslippy 04-20-2008 10:04 AM

Using the default style and using a replacment variable for
collapse_tcat.gif -> collapse_tcat.png
collapse_tcat_collapsed.gif -> collapse_tcat_collapsed.png
It still does not flip the image dynamically. If I leave the the forum category collapsed and refreshed it shows the new image. So something with the ajax does flip a PNG.

Opserty 04-20-2008 10:24 AM

What are you talking about "flip the image dynamically"? The Javascript only changes the file name, what you may need to do is preload the image (i.e. make it really small and just use an <img> tag to load it in the browser) I'm not 100% sure but that might be why. Have you checked the source code of the page to see if it has been changed (when you collapse it).

A direct link might aid others trying to assist you.

ssslippy 04-20-2008 11:39 PM

I cant direct link anything due to it being a test forum setup. Its not switching the images when its a PNG. I really cant give anymore detail then that as its that simple.


All times are GMT. The time now is 01:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01180 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete