Go Back   vBulletin Setup > vBulletinSetup Information > vBulletin Skins, Styles and Templates

Why not Register and remove some of the ads from vBulletin Setup
Post New Thread  Reply



#1   02-02-2008, 03:19 AM
Yogesh Sarkar is just really niceYogesh Sarkar is just really nice Join Date: Feb 2007 Posts: 603 Location: New Delhi, India
Calling a text file from template


I am thinking of removing ads from the template and placing them in a text file which I would then call from template. I am doing this because I only display ads to guests and I believe this would reduce the size of template for registered members, since call statement would be put inside if statement and would be shorter than code for adsense.

I have two questions regarding this:

A. How do I actually call a text file from temple so that the content of the file i.e. adsense code is included in the template.

B. Will this also reduce template load time for guests i.e. those using internet explorer currently have to wait for the full page to load (including ads) before any thing is displayed, by placing the javascript code in an external file; I think the forums would load first and then ads, would this be the case?
Quote   |  



#2   02-02-2008, 04:16 AM
Send a message via Yahoo to MaddenGods MaddenGods is a jewel in the roughMaddenGods is a jewel in the rough Join Date: Jan 2008 Posts: 625 Location: Ohio
Re: Calling a text file from template


You use the plugin system, Im not sure how to call a text file into a template, but i'm sure it can be done. I'm looking on vb.org now for you

And it may decrease the load. Depending on what javascript code you speak of, it may take that code and cache it, but then if you changed it and people never did a hard refresh it may not update. Or it may increase the load, i'm not real sure.
--------------------
David / vBulletin Setup Staff
Check out our Newsletter for the latest vB and SEO news.
Are you looking for vBulletin work to be done on your forums ?
Would you like to Help Support vBulletin Setup.
Check out my Webmaster Articles at the vBulletin Setup Blog! SEO Talk
Quote   |  



#3   02-02-2008, 05:01 AM
Yogesh Sarkar is just really niceYogesh Sarkar is just really nice Join Date: Feb 2007 Posts: 603 Location: New Delhi, India
Re: Calling a text file from template


I am talking about adsense code, since it is there in the template between the if statement to only appear for guests, the code is being downloaded even for members.

Also for guests what is happening is, people who are using internet explorer have to wait for the full page to load (including ads) before any thing is visible. I think if the ad code is in another file, it wont slow down the loading of the page (not 100% sure about this.).
Quote   |  



#4   02-02-2008, 11:08 AM
Yogesh Sarkar is just really niceYogesh Sarkar is just really nice Join Date: Feb 2007 Posts: 603 Location: New Delhi, India
Re: Calling a text file from template


Got that confirmation from vBulletin support that I wouldn’t be able to do this without making a plugin
Quote   |  



#5   02-02-2008, 04:31 PM
bdude is a jewel in the roughbdude is a jewel in the rough Join Date: Aug 2007 Posts: 477 Location: Tasmania, Australia
Re: Calling a text file from template


There's one way of doing it without making a plugin, you could use style replacement variables:
Code:
<if condition="">
@@ADSENSE-guests@@
</if>
and then create a replacement variable for @@ADSENSE-guests@@ (or whatever you choose) and paste your code in. But remember you can't use any variables or conditionals in a replacement variable.
--------------------
Bryce R [[ BLOG ]]
The Blogging Café - Blogging Forum
Do you run a forum? Check out my forum owners blog.
Quote   |  



#6   02-03-2008, 06:21 AM
Yogesh Sarkar is just really niceYogesh Sarkar is just really nice Join Date: Feb 2007 Posts: 603 Location: New Delhi, India
Re: Calling a text file from template


That's a good idea, let me check if I can do this
Quote   |  



#7   02-03-2008, 06:24 AM
Send a message via MSN to Magnumutz Send a message via Yahoo to Magnumutz Send a message via Skype™ to Magnumutz Magnumutz has a spectacular aura about Join Date: Dec 2006 Posts: 460 Location: Romania
Re: Calling a text file from template


Well... did it work?
Quote   |  



#8   02-04-2008, 09:22 AM
Yogesh Sarkar is just really niceYogesh Sarkar is just really nice Join Date: Feb 2007 Posts: 603 Location: New Delhi, India
Re: Calling a text file from template


Been busy and sick, so didn't get a chance to test it out till now. But will do that in a day or so.
Quote   |  
Post New Thread  Reply
vBulletin Setup > vBulletinSetup Information > vBulletin Skins, Styles and Templates


Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
I don't understand what to do with the PSD file Luigi vBulletin Skins, Styles and Templates 6 11-07-2007 09:26 PM
Preventing people reading your robots.txt file? Ekka vBulletin Questions 19 10-28-2007 01:06 AM
posting a pdf file on the forum Lampwick vBulletin Questions 4 10-08-2007 10:31 PM
Avatar File Upload Problem scubastix vBulletin Questions 3 09-16-2007 09:49 AM
file lost terry brian Computer Tech Information 5 05-22-2007 11:20 AM


All times are GMT -6. The time now is 07:12 AM.

vBulletin Setup, vBulletin Setup Forums, vBulletin Services, vBulletin Blogs, vBulletin SEO, vBulletin Questions, vBulletin Skins, Styles, Templates
vBulletin Hacks / Modifications, vBulletin Monetization, Blogs, vBulletin Link Directory,Quality Link Directory