Philo Hermans: Editing template wrap content does not work -> Ad Seller -> Tracker

Jump to content

Report ID 5 Title Editing template wrap content does not work
Product Ad Seller Status UNFILED (Severity 1 - Low)
Version 2.0.0 Fixed in -


Report ID #5: Editing template wrap content does not work

#1 Guest_Tristan_*

  • Group: Guests

Posted 04 May 2010 - 10:07 PM

Hello,

first of all your script is just awesome.

But there is some functionality missing (how many times the ad has been displayed + how many clicked on it)

i wanted to edit the Wrap content on my 2 templates from :

<li style="margin-top:6px;margin-left:-17px;position:absolute;">
       <a href="{ad_url}">
          <img src="{ad_banner}" alt="{website_name}" />
       </a>
</li>


to

<li>
       <a href="{ad_url}" onclick="recordOutboundLink(this, 'Outbound Links', 'click outgoing links');return false;">
          <img src="{ad_banner}" alt="{website_name}" />
       </a>
</li>


each time i save + i want to edit it again, the information i just entered are not saved. What the bug ?

PS do i have to add : target="_blank" or when i click on the ad, it'll open up in a new tab automatically ? thanks



Replies (1 - 3)

#2 User is offline  
Philo Icon

  • Administrator
  • Icon
  • Group: Administrators
  • Posts: 68
  • Joined: 26-October 09

Posted 18 June 2010 - 07:47 AM

Updating severity to: 1 - Low

Tristan, on 04 May 2010 - 11:07 PM, said:

Hello,

first of all your script is just awesome.

But there is some functionality missing (how many times the ad has been displayed + how many clicked on it)

i wanted to edit the Wrap content on my 2 templates from :

<li style="margin-top:6px;margin-left:-17px;position:absolute;">
   	<a href="{ad_url}">
          <img src="{ad_banner}" alt="{website_name}" />
   	</a>
</li>


to

<li>
   	<a href="{ad_url}" onclick="recordOutboundLink(this, 'Outbound Links', 'click outgoing links');return false;">
          <img src="{ad_banner}" alt="{website_name}" />
   	</a>
</li>


each time i save + i want to edit it again, the information i just entered are not saved. What the bug ?

PS do i have to add : target="_blank" or when i click on the ad, it'll open up in a new tab automatically ? thanks


Dear Tristan,

Sorry for the late reply.
Ad-Seller only allows HTML in the templates for security reasons.

If you want to edit the code please edit the following file: ad_seller/application/views/pages/display_ads.php


Yes, you have to add target="_blank" to make it open in a new tab.
Kind regards,

Philo Hermans

#3 Guest_tristan_*

  • Group: Guests

Posted 19 June 2010 - 08:39 PM

<?php 

if(!empty($campaign)){

	if(!empty($ads)){
		// Display the start of the wrap
		echo $this->core_model->disp_template($campaign[0]['id'], 'wrap_start');
		
		// Set Content
		
		foreach($ads as $a){ 
			
			$wrap_content = $this->core_model->disp_template($campaign[0]['id'], 'wrap_content');
			// Replace tags with the data from the database
			$wrap_content = str_replace("{ad_url}", $a['url'], $wrap_content);
			$wrap_content = str_replace("{ad_banner}", $this->core_model->uploadUrl($a['banner']), $wrap_content);
			$wrap_content = str_replace("{website_name}", $a['website_name'], $wrap_content);
			
			// Display parsed content
			echo $wrap_content;
		}
		
		// Display the end of the wrap
		echo $this->core_model->disp_template($campaign[0]['id'], 'wrap_end');
	}else{
		echo $campaign[0]['blank'];
	}
	
}else{
		echo 'Unknown Campaign';
}

?>


oh crap this is chinese.

Where do i put the code to
1. Record the click ( onclick="recordOutboundLink(this, 'Outbound Links', 'click outgoing links');return false;" )
2 Open the link in a new tab ( target="_blank" )

Thanks

#4 User is offline  
Philo Icon

  • Administrator
  • Icon
  • Group: Administrators
  • Posts: 68
  • Joined: 26-October 09

Posted 20 June 2010 - 09:06 AM

tristan, on 19 June 2010 - 09:39 PM, said:

<?php 

if(!empty($campaign)){

	if(!empty($ads)){
		// Display the start of the wrap
		echo $this->core_model->disp_template($campaign[0]['id'], 'wrap_start');
		
		// Set Content
		
		foreach($ads as $a){ 
			
			$wrap_content = $this->core_model->disp_template($campaign[0]['id'], 'wrap_content');
			// Replace tags with the data from the database
			$wrap_content = str_replace("{ad_url}", $a['url'], $wrap_content);
			$wrap_content = str_replace("{ad_banner}", $this->core_model->uploadUrl($a['banner']), $wrap_content);
			$wrap_content = str_replace("{website_name}", $a['website_name'], $wrap_content);
			
			// Display parsed content
			echo $wrap_content;
		}
		
		// Display the end of the wrap
		echo $this->core_model->disp_template($campaign[0]['id'], 'wrap_end');
	}else{
		echo $campaign[0]['blank'];
	}
	
}else{
		echo 'Unknown Campaign';
}

?>


oh crap this is chinese.

Where do i put the code to
1. Record the click ( onclick="recordOutboundLink(this, 'Outbound Links', 'click outgoing links');return false;" )
2 Open the link in a new tab ( target="_blank" )

Thanks


Dear Tristan,

Login to Ad-Seller, and edit your template to something like this:

<li> {link_start} <img src="{ad_banner}" alt="{website_name}" /> </a> </li>



In the PHP file add the following below the: // Replace tags with the data from the database line.


$wrap_content = str_replace("{link_start}", '<a href="'.$a['url'].'" onclick="recordOutboundLink(this, "Outbound Links", "click outgoing links");return false;" target="_blank">', $wrap_content);


Code is not tested - but something like this should work.
Kind regards,

Philo Hermans



Fast Reply

  

1 User(s) are reading this issue
1 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.0 © 2010  IPS, Inc.