Jump to content
Sign in to follow this  
mallorcanytt

Solutions for inserting code for ads (Trade doubler)

Recommended Posts

mallorcanytt

Hi What built in features in PlatformPro are available for displaying ads. 1. Display a big ad above header (absolute top of site) 2. Display a ad in forum sidebar (not image + link) but code retrieved from Trade Doubler. Same solution as in theme sidebar by adding a text widget with code in it. The solution has to be easy to handle. Copy - Paste the ad code in admin backend. Preferably in a widget. Example of code to paste:

<script type="text/javascript">
	var uri = 'http://impse.tradedoubler.com/imp?type(img)g(957657)a(1971669)' + new String (Math.random()).substring (2, 11);
	document.write('');
	</script>[/code]

In what ways can i insert(paste) code for displaying ads Problem: Adding

Share this post


Link to post
Share on other sites
Kate

Hi Jonas, We don't have any built in features for displaying ads. You would need to use a custom solution. For the header, using a hook would probably be a good idea. And, for the sidebar: you could try a widget like PHP Exec.

Share this post


Link to post
Share on other sites
mallorcanytt

Hi Kate I really want to have a widget solution for the forum sidebar: "Display a ad in forum sidebar (not image + link) but code retrieved from Trade Doubler. Same solution as in theme sidebar by adding a text widget with code in it." How can i widgitize the forum sidebar when the _sidebar.php file is handled in the bbpress PlatformForum theme but i want to handle the widget in WordPress admin?

Share this post


Link to post
Share on other sites
cmunns

One of the many pitfalls of bbPress. ..but the code would be the same even if you added it to the php file so why not just go with that?

Share this post


Link to post
Share on other sites
mallorcanytt

Well, i have no problem opening up the .php-file and add the code there. But for the person responsible for managing ads this is no option. The interface have to be the WP-admin or maybe the bbPress admin. In wp-admin. 'PlatformPro -> Settings -> Forum settings' there is a option for adding a forum sidebar image+link. One way could be to add the possibility to add code there. Can this be done from altering/adding files in the child theme Platform Base. If yes could PageLines support team or anybody else provide the code?

Share this post


Link to post
Share on other sites
cmunns

Well this is how you could add the option from the functions.php of Base ` function new_options($option_array){ $new_array= array( 'default' => 'hello', // default value 'type' => 'textarea', // type of option - see class.options.ui.php in core for list 'inputlabel' => 'Option Label', // label on input 'title' => 'Your Custom Script', // Title of option 'shortexp' => 'Add Script for your Forum Sidebar', // Short explanation of option 'exp' => 'Use this area to customize your forum ads' // Inline doc for option ); array_push( $option_array['forum_settings'], $new_array); return $option_array; } ` Then you just output the option in the forum sidebar `echo pagelines_option('option_name');`

Share this post


Link to post
Share on other sites
mallorcanytt

@Adam First i want to thank you for the tip. Perfect solution for me. But... When adding a new array (option) into the config.options.php it works great (see the last lines in pasted code below). But i cant seem to get the code you provided to work. Maybe its my php-skills that fails. Could you please test your code live and provide the exact code to make this work.

		if( pagelines_option('forum_options') ){
			$forum_options = array(
					'forum_settings' => array(
							'forum_tags' => array(
									'default' => true,
									'type' => 'check',
									'inputlabel' => 'Show tags in sidebar?',
									'title' => 'Tag Cloud In Sidebar',
									'shortexp' => 'Including post tags on the forum sidebar.',
									'exp' => 'Tags are added by users and moderators on your forum and can help people locate posts.'
								),
							'forum_image_1' => array(
									'default' => '',
									'type' => 'image_upload',
									'inputlabel' => 'Upload Forum Image',
									'imagepreview'	=> 125,
									'title' => 'Forum Sidebar Image #1',
									'shortexp' => 'Add a 125px by 125px image to your forum sidebar',
									'exp' => "Spice up your forum with a promotional image in the forum sidebar."
								),
							'forum_image_link_1' => array(
									'default' => '',
									'type' => 'text',
									'inputlabel' => 'Image Link URL',
									'title' => 'Forum Image #1 Link',
									'shortexp' => 'Full URL for your forum image.',
									'exp' => "Add the full url for your forum image."
								),
							'forum_image_2' => array(
									'default' => '',
									'type' => 'image_upload',
									'imagepreview'	=> 125,
									'inputlabel' => 'Upload Forum Image',
									'title' => 'Forum Sidebar Image #2',
									'shortexp' => 'Add a 125px by 125px image to your forum sidebar',
									'exp' => "Spice up your forum with a promotional image in the forum sidebar."
								),
							'forum_image_link_2' => array(
									'default' => '',
									'type' => 'text',
									'inputlabel' => 'Image Link URL',
									'title' => 'Forum Image #2 Link',
									'shortexp' => 'Full URL for your forum image.',
									'exp' => "Add the full url for your forum image."
								),
							'forum_sidebar_link' => array(
									'default' => '#',
									'type' => 'text',
									'inputlabel' => 'Forum Image Caption URL',
									'title' => 'Forum Caption Link URL (Text Link)',
									'shortexp' => 'Add the URL for your forum caption (optional)',
									'exp' => "Text link underneath your forum images."
								),
							'forum_sidebar_link_text' => array(
									'default' => 'About '.get_bloginfo('name'),
									'type' => 'text',
									'inputlabel' => 'Forum Sidebar Link Text',
									'title' => 'Forum Sidebar Link Text',
									'shortexp' => 'The text of your image caption link',
									'exp' => "Change the text of the caption placed under your forum images."
								),
							'forum_sidebar_ad_code' => array(
								'default' 		=> 'Ad code goes here', // default value
								'type' 			=> 'textarea', // type of option - see class.options.ui.php in core for list
								'inputlabel' 	=> 'Ad code', // label on input
								'title' 		=> 'Ad code',	// Title of option
								'shortexp' 		=> 'Add advertising code to dispay ad in sidebar' , // Short explanation of option
								'exp' 			=> 'Use this area to customize your forum ads' // Inline doc for option
	
								)
						)
				);
	

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×