FusionBB
Calendar
SMTWTFS
 1234
567891011
12131415161718
19202122232425
2627282930 
September Birthdays
9-21bubazoo
News & Announcements
Online Past 24 Hrs
couchtomatoe , grimdeeper ,
Tagging

Looking for a Modification? It is much easier to view and search for Modifications using our Modification Index.

Username Post: Beta-[2.1] InlineAds For v2.1        (Topic#333)
Stephen 
maximus

Stephen
Post Rank (AVG): 0%
06-06-07 04:45 AM - Post#2229    



Description: This modification will extend v2.1 new inline ad feature and also display the ad in showforum.php



Working Under: Fusion 2.1

Modification Status: Beta

Pre-requisites: v2.1

Author(s): Stephen

Date: 06/05/07

Credits:

Files Altered: showforum.php
showforum_t_row.php


New Files:

Database Altered: No

Instructions / Other Info: Open showforum.php

Find
Code:

  $sql "     SELECT forum_title,forum_active,forum_description,forum_topics,forum_sort,forum_parents,forum_is_cat,forum_children,forum_parent_id,forum_topic_age,forum_gallery,forum_insert,forum_link,forum_rss_feed,forum_css,forum_header,forum_footer,forum_calendar,forum_calendar_cache     FROM " TABLE_PREFIX "forums     WHERE forum_id = '".addslashes($fid)."' "; if(!$results=$db->executeQuery($sql)) {     dieHere(1,$lang_str['BAD_QUERY'],__LINE__,__FILE__,$sql); } list ($ftitle,$factive,$fdesc,$total_topics,$forum_sort,$parents,$iscat,$children,$parentid,$topic_age,$gallery,$insert,$link,$rss_feed,$forum_skin,$forum_header,$forum_footer,$forum_calendar,$forum_calendar_cache) = $db->fetchRow($results); $db->clearResults($results); $forum_topics $total_topics;  





Replace:
Code:

  $sql "     SELECT forum_title,forum_active,forum_description,forum_topics,forum_sort,forum_parents,forum_is_cat,forum_children,forum_parent_id,forum_topic_age,forum_gallery,forum_insert,forum_link,forum_rss_feed,forum_css,forum_ad,forum_header,forum_footer,forum_calendar,forum_calendar_cache     FROM " TABLE_PREFIX "forums     WHERE forum_id = '".addslashes($fid)."' "; if(!$results=$db->executeQuery($sql)) {     dieHere(1,$lang_str['BAD_QUERY'],__LINE__,__FILE__,$sql); } list ($ftitle,$factive,$fdesc,$total_topics,$forum_sort,$parents,$iscat,$children,$parentid,$topic_age,$gallery,$insert,$link,$rss_feed,$forum_skin,$forum_ad,$forum_header,$forum_footer,$forum_calendar,$forum_calendar_cache) = $db->fetchRow($results); $db->clearResults($results); $forum_topics $total_topics;  





Code:

  Find:         $template->setTemplateVar("LAST_POSTER",$topic_data[$i]['topic_last_poster']);         $topics .= $template->processTemplate();  





Code:

  replace:         $template->setTemplateVar("LAST_POSTER",$topic_data[$i]['topic_last_poster']);                  // INLINE ADS         if( $forum_ad ) {             if ($i == 12) {  // indicate how many posts to display before showing the ad.                 $template->setTemplateVar("INLINE_AD","<tr class ='color1'><td colspan=6 align='center' valign='middle' class ='color1'> $forum_ad </td></tr>");             }         }         $topics .= $template->processTemplate();  






in showforum_t_row.php

add

<!--INLINE_AD-->

Disclaimer:
Please backup every file that you intend to modify. If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your Fusion code, you may be giving up your right for 'official' support from InteractivePHP, Inc..If you need official support, you'll need to restore unmodified files.


 
Craig W 
newbie

Craig W
Post Rank (AVG): 0%
06-08-07 07:56 AM - Post#2232    


    In response to Stephen

Stephen

Thanks for the updated mod!

Cheers
 
Coynster 
newbie

Post Rank (AVG): 0%
06-08-07 12:37 PM - Post#2233    


    In response to Craig W

Could this be configured to display ads only when a user is not logged in, ie as in a guest? Or via a permission system?
 
Stephen 
maximus

Stephen
Post Rank (AVG): 0%
06-13-07 09:14 AM - Post#2240    


    In response to Coynster

eventually that will be the plan, it will be permissions based so that only members of certain groups can choose to ignore inline ads...
 
Stephen 
maximus

Stephen
Post Rank (AVG): 0%
06-13-07 06:44 PM - Post#2242    


    In response to Stephen

ok I just figured this out and have it working on my site now people of my "Gold" group have the option in their profile to show or hide inline ads in all list views...

Forum Index
Show Forum
Show Topic
Recent Topics
Search Results

The instructions are extensive so I have to run thru what it is I did to figure it out then will post it.
you will need 2 new fields in your database.


 
Ted_G 
newbie

Ted_G
Post Rank (AVG): 0%
07-29-07 12:18 AM - Post#2374    


    In response to Stephen

This did not work on my simulator version of FusionBB 2.1. Can more specific instructions including what changes from Version 1.1 of the Inline Ads post need to be incorporated into this Beta Version 2.1 post ???

Systems Manager
Cyberwalker.com
LabRats.tv
LittleGeeks.org


 
Monkeyra 
maximus

Monkeyra
Post Rank (AVG): 0%
04-15-09 07:55 AM - Post#2880    


    In response to Ted_G

Stephen, will you be implementing this for 3.0?

www.fordmondeo.org
www.stdrivers.co.uk




Edited by Monkeyra on 04-15-09 07:55 AM. Reason for edit: No reason given.
 
Icon Legend Permissions & Sharing Options Topic Options
Print Topic


4753 Views
Shout Box
Current Weather

Enter a city or zip code:

FusionBB™ Version 3.2 Alpha 1 | ©2003-2020 InteractivePHP, Inc.
Execution time: 0.136 seconds.   Total Queries: 122   Zlib Compression is on.
All times are (GMT+1). Current time is 08:59 PM
Top