vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=188)
-   -   How To Move anything, including shoutboxes, into any forum (https://vborg.vbsupport.ru/showthread.php?t=130255)

HPIA 10-28-2006 10:00 PM

How To Move anything, including shoutboxes, into any forum
 
I have asked so many people and the task was a simple if condition code and moving a template. It took me forever to figure out, but here I am.

First, go to your vbshout template. Copy it all.

Now go to the FORUMDISPLAY template. You can put it in two places. You can put it in many places: exactly under $navbar, or exactly right above $forumbits. I recomend right above $forumbits. Fill in the code then past that down wherever you want it to show up in your forum.

Code:

<if condition="$forumid==XXX">

Code here...

</if>

Change the XXX to the forum id you want to move this to.

This will work for anything, not just shoutboxes, cboxes, etc. But I thought I'd post this up since no one could tell me the answer.

Plus, now the vbshout template is no longer needed. You can delete the template if you want. If you do delete it, the shoutbox on the main index will then disappear, which you most likely want.

I am not sure, but there is probably a way to just put like $vbshout instead of deleting the current template and pasting that long code, but I am not a coder, and couldn't tell you that. I will do some studying, as I have a hunch.

Enjoy :).

HPIA 10-31-2006 02:23 AM

Found it!

Here is the easiest way to move the shoutbox. Use peterska2's tutorial on making custom templates via plugins, see here. By using the stand template name, or you can change it I suppose, $forumhome_vbshout , you can then keep all templates unfooled around with :).

Easy!

Again, I am sure most of you coders know how to do this easily, but I didn't and I asked for help and no one could give me an honest answer. But I figured it out eventually, after my board crashing...twice XD. So yeah, criticism or comments or whatever is welcome :)

tillcat5 06-04-2007 04:44 PM

this works .. i just cant get it to add more then one forum id and still work. any suggestions

dyna88 06-04-2007 04:56 PM

Maybe try an array???

HTML Code:

<if condition="in_array($forumid, array(X,Y,Z))">
</if>


tillcat5 06-04-2007 05:45 PM

thanks

fly 06-11-2007 02:30 PM

Now, if you could move thread icons into the thread itself without file edits, I'd probably start a religion based on you.

(I know its an entirely different task, but seems semi-related to me.)

Jasem 04-23-2008 08:16 PM

Thank you very much


All times are GMT. The time now is 02:34 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03709 seconds
  • Memory Usage 1,720KB
  • 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)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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