Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Advertising in each article

Asked Modified Viewed 2,368 times
G
gratisman
G
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

How to make that ad to show up automatically in each article? Two ads on the article on the top and bottom.
My guess is that the three modified file articles.php and do something about it:

render_article($article_subject, $article[$rowstart], $article_info);


Thx for help :)
0 replies

4 posts

F
Falk
F
Falk 148
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

Try this Addon ,
http://www.php-fusion.co.uk/infusions/addondb/view.php?addon_id=137
0 replies
G
gratisman
G
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Thanks, but this plugin does not show me ads, I think I'll stick to the manual addition of ads :P
0 replies
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
answered
Member

Example, insert of code manually in the central panel 'Other articles in this section'.
i.piccy.info/i9/8d5b7b789a32864d514791c159dbfa13/1398783418/31046/739268/primer_500.jpg
i.piccy.info/a3/2014-04-29-14-56/i9-6312124/500x256-r/i.gif

Can someone handy, this code:

//------------*Start*-------------//

if (isset($_GET['article_id']) && isNum($_GET['article_id']) && FUSION_SELF=='articles.php' ) {
//locales
$l_name = 'Other articles in this section:';
$l_nonews = '<i>In this section no other articles.</i>';
$l_thiscat = 'Transition into the category...';
//===
$ca_count = 10 ; //max art
$ca_ntrim = 80 ; //reduce art
//===
opentable($l_name);
echo "<table border='0' width='100%' cellspacing='0' cellpadding='3'>\n<tr>\n";
echo "<td class='tbl' width='50%'>\n";
$article_now = $_GET['article_id'];
$see_cat = 0 ;
$result1 = dbquery("SELECT article_cat FROM ".DB_PREFIX."articles WHERE article_id=$article_now LIMIT 1");
if ($data1 = dbarray($result1)) { $see_cat = $data1['article_cat']; }
$result1 = dbquery("SELECT article_subject,article_id FROM ".DB_PREFIX."articles WHERE article_cat=$see_cat AND article_id<>$article_now ORDER BY RAND() DESC LIMIT $ca_count");
if (dbrows($result1)) {
echo '<ul>';
while ($data1 = dbarray($result1)) {
echo "<li><span class='small'></span> <a href='".BASEDIR."articles.php?article_id=".$data1['article_id']."' title='".$data1['article_subject']."'>".trimlink($data1['article_subject'],$ca_ntrim)."</a></li>";
}
echo '</ul>';
}
else { echo $l_nonews; }
echo '<hr/><div align="center"><a href="'.BASEDIR.'articles.php?cat_id='.$see_cat.'">'.$l_thiscat.'</a></div>';
}
echo "</td>\n";
//----------*Block_ads*-------//
echo "<td class='tbl' width='50%'>\n";
//
?>
Here insert Script Code ...
<?php
//
echo "</td>\n";
echo "<tr>\n</table>\n";
closetable();

//------------* End *---------------//
Edited by zizub on 29-04-2014 16:06,
0 replies
G
gratisman
G
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

This is a modification for php-fusion 6 :

readarticle.php
find
render_article($article_subject, $article[$rowstart], $article_info);


replace
$ads = " [b]CODE ADS[/b] ";
      $art_z_reklama = "<table border=0 width='100%' cellpadding='4'><tr><td align='center'>".$ads."</td></tr><tr><td style='text-align:justify'>".$article[$rowstart]."</td></tr><tr><td align='center'>".$ads."</td></tr></table>";
      render_article($article_subject, $art_z_reklama, $article_info);


How to make the same change in Php fusion 7 ?
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 4 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

F
F
Falk 148
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
Z
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
G
G
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet