vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Forum Home Enhancements - Adsense code in fake forum on forum home (https://vborg.vbsupport.ru/showthread.php?t=241996)

sKippah 05-07-2010 03:59 PM

How can u get rid of the Counters?

naisho 05-08-2010 08:20 AM

Quote:

How can u get rid of the Counters?
If you want to hide statistics (counters) and last post info, in the same two templates, you need to add the same conditions before the statistics code.
Locate this part:

Code:

        <h4 class="nocss_label">{vb:rawphrase forum_statistics}:</h4>
                <ul class="forumstats td">
                        <li>{vb:rawphrase threads}: {vb:raw forum.threadcount}</li>
                        <li>{vb:rawphrase posts}: {vb:raw forum.replycount}</li>
                </ul>
                <div class="forumlastpost td">
                        <h4 class="lastpostlabel">{vb:rawphrase last_post}:</h4>
                        <div>
                                {vb:raw forum.lastpostinfo}
                        </div>
                </div>


Before this part you add the condition:

Code:

<vb:comment>Do not show statistics and last post info in these forums</vb:comment>
<vb:if condition="$forumid != in_array($forumid, array(X,Y))">


And after you close your if condition:

Code:

</vb:if>
<vb:comment>Do not show statistics/last post info - end</vb:comment>


So, the result should be this:

Code:

     
<vb:comment>Do not show statistics and last post info in these forums</vb:comment>
<vb:if condition="$forumid != in_array($forumid, array(X,Y))">

<h4 class="nocss_label">{vb:rawphrase forum_statistics}:</h4>
                <ul class="forumstats td">
                        <li>{vb:rawphrase threads}: {vb:raw forum.threadcount}</li>
                        <li>{vb:rawphrase posts}: {vb:raw forum.replycount}</li>
                </ul>
                <div class="forumlastpost td">
                        <h4 class="lastpostlabel">{vb:rawphrase last_post}:</h4>
                        <div>
                                {vb:raw forum.lastpostinfo}
                        </div>
                </div>
</vb:if>
<vb:comment>Do not show statistics/last post info - end</vb:comment>


sKippah 05-08-2010 07:40 PM

Perfectly. Two more, the last ;), questions. Is it possible to center the ad(s) and is it also possible to add a refresh function?
Thanks a lot

naisho 05-08-2010 07:55 PM

These edits are quite simple as they keep the div and only hide their contents (title, statistics and last post).
If you want to center the whole thing in the page, then the template must be completely different.
I don't know how to refresh the ad code. Sorry.

Network Master 05-12-2010 08:29 AM

i wont to but google ads where i but here

valdet 05-12-2010 09:18 AM

Quote:

I used this kind of template mod on previous vBulletin 3.8, but it didn't work any longer with version 4.xx so I made a new one.
Can you please share the code how you achieved that in vB 3.x versions?

I need to add an ad banner in middle of forums on my forum homepage.

Thanks

sKippah 05-12-2010 11:12 AM

btw i still dont get why x and y
If i add a new forum i just have one id. is this maybe for the Forum-Kategorie AND the forum itself?

naisho 05-12-2010 07:44 PM

Quote:

Originally Posted by skippah
btw i still dont get why x and y
If i add a new forum i just have one id. is this maybe for the Forum-Kategorie AND the forum itself?

X and Y are the Ids of the two forums you created, if you create two.
If you create only one, you don't need the Y.
In this case you could use this kind of condition:

Code:

<vb:if condition="$forumid != X">
Instead of:

Code:

<vb:if condition="$forumid != in_array($forumid, array(X,Y))">
Quote:

Originally Posted by valdet
Can you please share the code how you achieved that in vB 3.x versions?

I don't know what code it was but I think I found it in the v.3.8 edit template forum somewhere.

0verl0rd 10-22-2010 02:17 PM

So do you guys still have your GA accounts? lol...

Ill just tag this for now.. :D
Thanks for sharing coder..

Lazorbeam 09-16-2011 01:09 AM

As of today the ads are still up in his forum, so I'm guessing this is legit.

However, forum row DOES change color on mouseover in his forum. Something to keep in mind.


All times are GMT. The time now is 01:19 AM.

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.01261 seconds
  • Memory Usage 1,741KB
  • 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
  • (6)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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