Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
[Solved] Adverts As Posts MOD
Post new topic   Reply to topic View previous topic :: View next topic
Goto page: 1, 2, 3 ... 19, 20, 21  Next
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
[Solved] Adverts As Posts MOD
PostPosted: 05/23/2007 9:02 AM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 3:01 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Hi brother,

I just installed a small called Adverts As Posts and the MOD code is

Code:
################################################################# ############################################
## MOD Title:  Adverts In Posts
## MOD Author: Dale Rodgers < > (Dale Rodgers) http://www.tntboards.com
## MOD Description: Automatically displays an advert in a topic as a post.
## MOD Version : 1.3.7
##
## Installation Level : Easy
##
## Installation Time  : ~30 Secs
##
## Files To Edit :    viewtopic.php    
##
##        
## Included Files :     None
##                    
##
###################################################################### ######################################
## For Security Purposes, Please Check: http://www.phpbbhacks.com/allhacks.php for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbbhacks.com/allhacks.php
###################################################################### ######################################
## Author Notes:
## This MOD was made to have adverts on your forum without ruining the design or looking nasty.
##   
##      - Abilty to change the advert
##          - Ability to change how many ads are displayed per topic
###################################################################### ######################################
## Other Notes:
## You need to replace Ad Code Here with your ad code.
###################################################################### ######################################
###################################################################### ######################################
## MOD History:
##
##
##   2005-02-06 - Version 1.3.7
##      - First release of the MOD
##
##
###################################################################### ######################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
###################################################################### ######################################


#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
   $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
   $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
   $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
   $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
   $num ++;

#
#-----[ FIND ]------------------------------------------
#
      'U_POST_ID' => $postrow[$i]['post_id'])
   );

#
#-----[ AFTER, ADD ]------------------------------------------
#
   if($i == $ad_after)
   {
      $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
      $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
      $num ++;

      $mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#ad';
      $template->assign_block_vars('postrow', array(
         'ROW_COLOR' => '#' . $row_color,
         'ROW_CLASS' => $row_class,
         'POST_DATE' => $post_date,
         'POST_SUBJECT' => 'Advertisement',
         'MINI_POST_IMG' => $mini_post_img,
         'POSTER_NAME' => 'Advertisement',
      'POSTER_RANK' => 'Advertiser',
         'MESSAGE' => '<div align="center">Ad code here</div>',
         'L_MINI_POST_ALT' => $mini_post_alt,
         'U_MINI_POST' => $mini_post_url,
         'U_POST_ID' => 'ad')
      );
   }

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


It installed and working perfectly but in MOD description in phpbbhacks I read that I can show ads on 1st post and the last post but as you can see in my FunWadi, I see in second post. How to show this ads as first and last posts and rest posts in between  dontknow
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Adverts As Posts MOD
PostPosted: 05/24/2007 12:09 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 7:01 PM
Location: St Pete, FL
peace.gif
To display this on every other post, I added the following line of code:

OPEN
viewtopic.php

FIND
Code:
if($i == $ad_after)
{

AFTER, ADD
Code:
$ad_after = $i+1;

The MOD in it's unaltered state should never have worked though.  The first pass through, $ad_after was not assigned any value, so the if statement should never have worked.  I have no idea why it does even now since on the first pass through, i is assigned 1 and $ad_after is assigned nothing, so there should never be any equality...

dontknow
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Adverts As Posts MOD
PostPosted: 05/24/2007 1:50 AM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 3:01 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Oh noo brother. I have already MOD installed called In-line AD MOD and that shows on every post or after 2 post also but I installed this MOD so I can put ad in such a way that first post should come as AD and than starts the topic original post and at the end the last post should be ad too so it means on every page only 2 ads. This is messing up whole forum by showing ads and ads Very Happy

Is it possible what I want or I will remove this MOD because than there is no use of this MOD
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Adverts As Posts MOD
PostPosted: 05/24/2007 2:21 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 7:01 PM
Location: St Pete, FL
peace.gif
I'm sure this can be modified to do as you want, but I'm too tired to deal with it right now.  We will have to look at it tomorrow after I've gotten some sleep...

I removed the code that I added so that it won't display on every other post...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Adverts As Posts MOD
PostPosted: 05/24/2007 2:23 AM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 3:01 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Okay, No problem.
Thanks a lot  Applause
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Adverts As Posts MOD
PostPosted: 05/24/2007 2:40 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 7:01 PM
Location: St Pete, FL
peace.gif
I got it to display the ad at the top and bottom of every topic page.  Is that what you had in mind???

dontknow
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Adverts As Posts MOD
PostPosted: 05/24/2007 2:40 PM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 3:01 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Woww. You did it  Applause  Applause

There is minor problem left that last post where ads are there, on the left side panel it shows

11043 FW$
[ Donate ] and Medal picture (If someone have)

like this post

http://www.funwadi.com/forum/post118129.html#ad

So any way to make that FW$ up because it is of upper post but it is coming down.
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: [Solved] Adverts As Posts MOD
PostPosted: 05/24/2007 2:48 PM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 3:01 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Here is the image which will make you easy to understand If I was not able to write properly.

Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Adverts As Posts MOD
PostPosted: 05/24/2007 3:20 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 7:01 PM
Location: St Pete, FL
peace.gif
Yes, it is fixed now.  Check it out...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Adverts As Posts MOD
PostPosted: 05/24/2007 3:27 PM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 3:01 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Ah, now it's looking so nice. Hope to receive some good donation now as every one will see first donation picture and than the 1st original post Wink

Thanks brother. I know it took a lot of time of yours  Applause  Applause  Applause

Btw brother, I just told my Main Moderator (name changed to Co-Admin) and will give him some more authorities in his MCP which I came to knew by reading the author's topic so I told him that to search some nice and cool phpBB templates/skin and I will search too........... I wish to receive your PM reply soon  banana  banana

Thank You,
Your bro,
AB
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
All times are GMT - 5 Hours
Goto page: 1, 2, 3 ... 19, 20, 21  Next
Page 1 of 21


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.0863s (PHP: 65% - SQL: 35%) - SQL queries: 58 - GZIP disabled - Debug on