Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[LMKWD] Create Your Own Custom Advertising Page Details »»
[LMKWD] Create Your Own Custom Advertising Page
Version: 1.00, by HM666 HM666 is offline
Developer Last Online: Feb 2021 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.2.2 Rating:
Released: 12-01-2014 Last Update: Never Installs: 6
Template Edits
Additional Files Translations  
No support by the author.

Brought To You By: Len M. Kaiser Web Design
Author: Len M. Kaiser
vBulletin Version: 4.0X (Should pretty much work with all vb versions although this was produced on a vB 4.2.2 site.)
DEMO: Be sure to choose the Default Template. DEMO LINK

Please do not PM me for support. Please click "Install" to get help with your page. Those who wish not to click "Install" will get no support from me.

This little add on is for those who do not have the vBulletin Suite and do not want to be bothered with installing a whole portal for just one advertising page. This mod will help you generate revenue to your website.

Suggestions:

1. You will need some idea about editing HTML & CSS in order for this mod to do you any good. I suggest that if you are not familiar with either language that you look HTML & CSS up on W3Schools to help you edit the template.

2. You install the Rotating Banner System to help you place your ads.

3. Be sure to have some ideas about how you want to do your advertising page before getting started.

This little mod will work for free banners, adsense, affiliates as well as banners you sell space for.

Steps To Create Your Custom Template:

1. Login to your AdminCP.
2. Go to Styles & Templates>Styles Manager & find the skin that you want to add the advertising page to.
3. Click on the drop down on the far right and choose "Add New Template".
4. Place the following information:
----Title Field: custom_advertising
----Template:
Code:
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"> xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
	{vb:raw headinclude}
	<title>{vb:raw vboptions.bbtitle}</title>
	<script type="text/javascript" src="clientscript/vbulletin_read_marker.js?v={vb:raw vboptions.simpleversion}"></script>
{vb:raw headinclude_bottom}
</head>
	<body>

	{vb:raw header}

	{vb:raw navbar}

	<div id="pagetitle">
<h1>Advertise With Us!</h1>
	</div>
<!--Create your custom ad code below this line //-->
<p>Here is where your advertising content would go. In order to edit this you will need some HTML/CSS experience to style it and make it look the way you want. If you are unsure you can get great information off the <a href="http://www.w3schools.com/html/">W3Schools Website</a>!</p>

<!-- DO NOT CHANGE BELOW THIS LINE! //-->
	{vb:raw footer}
</body>
</html>
----Editable Regions: All areas that are marked in red are the ones that you can change. The rest do not change it unless you really know what you are doing and are proficient in HTML. Edit the area for your advertising information before you save the template.
5. Click the "Save" button.

Creating The advertise.php File:

1. Open a HTML Editor or Notepad (if in Windows). DO NOT use Word Pad or MS Word!
2. Copy and paste the following code into the page:
Code:
<?php

error_reporting(E_ALL & ~E_NOTICE);

define('THIS_SCRIPT', 'custom_advertising');
define('CSRF_PROTECTION', true);
define('CSRF_SKIP_LIST', '');
define('VB_ENTRY', 'advertise.php');

$phrasegroups = array();


$specialtemplates = array();


$globaltemplates = array('custom_advertising',
);


$actiontemplates = array();


require_once('./global.php');

$navbar = render_navbar_template(construct_navbits($navbits));

$templater = vB_Template::create('custom_advertising');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
print_output($templater->render());

?>
No changes to that code are needed if you followed everything above for the template.
3. Save the page as "advertise.php".
4. Upload advertise.php to your forum root. Don't know where your forum root is? You can ask your host or find out in your AdminCP by going to Maintenance>View PHP Info - look for DOC_ROOT or DOCUMENT_ROOT for the correct pathway. To upload you will need a FTP client.

Now you should be able to view your advertising page by going to http://yourdomain.com/advertise.php. Obviously you will replace "yourdomain" with your domain.

Screenshots

File Type: jpg Len M Kaiser vB4 Dev Forums 2014-12-02 17-30-06.jpg (42.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-02-2014, 09:19 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Len, is there a reason you did not make this into a mod, instead of a template edit?

Nevermind, I see the end user would have to do template editing anyway, to add the advertising code.
Reply With Quote
Благодарность от:
ramesh_umk3
  #3  
Old 12-02-2014, 09:57 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
Len, is there a reason you did not make this into a mod, instead of a template edit?

Nevermind, I see the end user would have to do template editing anyway, to add the advertising code.
The main reason is I'm not well versed in php code just yet. I hand code HTML & CSS, but programming languages I have not done just yet. I know enough to edit them and make changes and sometimes fix them, but other than that it would make a better template...for now lol.

Also you are right there would be edits anyways. Of course if I had the knowledge to create the templates within a product then that most likely would work, but that might be awhile.
Reply With Quote
  #4  
Old 12-04-2014, 01:19 PM
ahobilam's Avatar
ahobilam ahobilam is offline
 
Join Date: Aug 2011
Location: Chennai, India
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HM666 View Post
if I had the knowledge to create the templates within a product then that most likely would work
Can anybody give the link for Article How to create a mod product (xml)?!
Thanks in advance.
Reply With Quote
  #5  
Old 12-04-2014, 01:20 PM
ahobilam's Avatar
ahobilam ahobilam is offline
 
Join Date: Aug 2011
Location: Chennai, India
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The Demo link is not rendering anything?!
Reply With Quote
  #6  
Old 12-04-2014, 01:40 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ahobilam View Post
The Demo link is not rendering anything?!
Refresh and try now.
Reply With Quote
  #7  
Old 12-04-2014, 03:33 PM
ahobilam's Avatar
ahobilam ahobilam is offline
 
Join Date: Aug 2011
Location: Chennai, India
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HM666 View Post
Refresh and try now.
OK fine.
Let me try the Modification and mark as installed.
thanks
Reply With Quote
  #8  
Old 12-04-2014, 09:40 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ahobilam View Post
OK fine.
Let me try the Modification and mark as installed.
thanks
No problem. Let me know if you still cannot see the advertising demo page.
Reply With Quote
  #9  
Old 12-25-2014, 08:42 AM
joeychgo's Avatar
joeychgo joeychgo is offline
 
Join Date: Mar 2004
Location: Chicago, IL
Posts: 933
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How is this different than this?
https://vborg.vbsupport.ru/showthread.php?t=228112
Reply With Quote
  #10  
Old 12-25-2014, 11:35 AM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by joeychgo View Post
Not really too much different really. There was a thread that I had answer a little while ago about advertising and I had made a post giving them lots of info and just figured I would show how to make an advertising page at the same time with the CMS installed. I was not able to find that post you referred to and sometimes its easier for some people to see it as the page they want rather than incorporate their own stuff especially if they are not a coding guru lol.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 03:24 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.05496 seconds
  • Memory Usage 2,338KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete