vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   replacement variable's based on forum style don't work for forum display (https://vborg.vbsupport.ru/showthread.php?t=191550)

mooreaa 09-22-2008 04:05 AM

replacement variable's based on forum style don't work for forum display
 
Hi,

I am running into a problem with replacement variables. I am using replacement variables to change the buttons to new file names. As an example, I replace reply.gif to reply-trans.png. This works with the default style just great.

I have a forum which has a different required style. This forum is used to post articles and as such instead of "New Thread" and "Add Reply" I want to change it to "New Article" and "Add Comment".

Using the replacement variables I updated the reply.gif to my new addcomment-trans.png and its working just fine.

The problem is with the newthread.gif image. When the forum is in forumdisplay and displaying this forum, it seems to be using the default style.

I was able to fix the look a little by adding a plugin that does the following on the hook: style_fetch

Code:

if( in_array($forumid,$ARTICLE_FORUM_IDS) )
{
        $styleid = $STYLE_ID_ARTICLESYSTEM;
}

This causes it to use the right style to be used, but it is still doing the replacement variables for the default style.

Are there any ways to workaround / fix this problem?

Marco van Herwaarden 09-22-2008 09:18 AM

Do you have set a fixed style for that forum in the forum options?

mooreaa 09-22-2008 06:10 PM

Under the forum options I set the correct forum style and also the Override Users' Style Choice option to yes.

Still no luck in getting the replacement variables to work... And i feel like the plugin method of changing the style may be a hack. Maybe somethign isn't setup right? Or is this normal behavior?


All times are GMT. The time now is 08:09 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.01644 seconds
  • Memory Usage 1,708KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete