Page 2 of 3

Re: Classifieds Ad Mod Installation

PostPosted: Tue Aug 15, 2006 1:39 am
Author: MadUser
can someone please post a link to his web site
i want to see the mod in action
<img>

Re: Classifieds Ad Mod Installation

PostPosted: Thu Aug 17, 2006 3:35 am
Author: Skywalker
"SLY LS1";p="8391" wrote:Im running 1.3.2 and uploaded this mod and it works perfectly.

The only thing that didnt work in the download was the DB upload file ads_db_install.php

Best to use this version below as it works perfectly, Create a file called db_update.php and paste the following into it. Copy it to your server (phpbb root), type db_update.php into your browser then delete the file again if all OK.

Code: Select all
<?php /***************************************************************************  *                               db_update.php  *                            -------------------  *  *   copyright            : ÂÂÂ ©2003 Freakin' Booty ;-P & Antony Bailey  *   project              : [url=http://sourceforge.net/projects/dbgenerator]http://sourceforge.net/projects/dbgenerator[/url]  *   Website              : [url=http://freakingbooty.no-ip.com/]http://freakingbooty.no-ip.com/[/url] & [url=http://www.rapiddr3am.net]http://www.rapiddr3am.net[/url]  *  ***************************************************************************/  /***************************************************************************  *  *   This program is free software; you can redistribute it and/or modify  *   it under the terms of the GNU General Public License as published by  *   the Free Software Foundation; either version 2 of the License, or  *   (at your option) any later version.  *  ***************************************************************************/  define('IN_PHPBB', true); $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx);  // // Start session management // $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); // // End session management //    if( !$userdata['session_logged_in'] ) {    $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';    header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));    exit; }  if( $userdata['user_level'] != ADMIN ) {    message_die(GENERAL_MESSAGE, 'You are not authorised to access this page'); }    $page_title = 'Updating the database'; include($phpbb_root_path . 'includes/page_header.'.$phpEx);  echo '<table>'; echo '<tr><th>Updating the database</th></tr><tr><td><span><ul>';    $sql = array(); $sql[] = "CREATE TABLE " . $table_prefix . "ads_adverts (    id int(11) NOT NULL AUTO_INCREMENT,    category varchar(25) NOT NULL DEFAULT '',    sub_category varchar(25) NOT NULL DEFAULT '',    ad_type_code smallint(1) NOT NULL DEFAULT '0',    ad_cost decimal(10, 2) NOT NULL default '0.00',    user_id mediumint(8) NOT NULL DEFAULT '0',    username varchar(32) DEFAULT NULL,    user_ip varchar(8) NOT NULL DEFAULT '',    time int(11) unsigned NOT NULL DEFAULT '0',    edit_user_id mediumint(8) DEFAULT NULL,    edit_time int(11) unsigned NOT NULL DEFAULT '0',    edit_count smallint(5) unsigned NOT NULL DEFAULT '0',    title varchar(50) NOT NULL DEFAULT '',    short_desc varchar(125) NOT NULL DEFAULT '',    price varchar(50) NOT NULL DEFAULT '0',    views int(11) NOT NULL DEFAULT '0',    status varchar(7) NOT NULL DEFAULT '',    expiry_date date NOT NULL DEFAULT '0000-00-00',    PRIMARY KEY (id))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_categories (    cat_category varchar(40) NOT NULL default '',    cat_sub_category varchar(40) NOT NULL default '',    cat_basic_cost smallint(6) NOT NULL default '0',    cat_standard_cost smallint(6) NOT NULL default '0',    cat_photo_cost smallint(6) NOT NULL default '0',    cat_premium_cost smallint(6) NOT NULL default '0',    cat_field_1_desc varchar(50) NOT NULL default '',    cat_field_2_desc varchar(50) NOT NULL default '',    cat_field_3_desc varchar(50) NOT NULL default '',    cat_field_4_desc varchar(50) NOT NULL default '',    cat_field_5_desc varchar(50) NOT NULL default '',    cat_field_6_desc varchar(50) NOT NULL default '',    cat_field_7_desc varchar(50) NOT NULL default '',    cat_field_8_desc varchar(50) NOT NULL default '',    cat_field_9_desc varchar(50) NOT NULL default '',    cat_field_10_desc varchar(50) NOT NULL default '',    cat_create_level tinyint(3) NOT NULL default '0',    cat_edit_level tinyint(3) NOT NULL default '0',    cat_delete_level tinyint(3) NOT NULL default '0',    cat_image_level tinyint(3) NOT NULL default '0',    cat_comment_level tinyint(3) NOT NULL default '0',    cat_rate_level tinyint(3) NOT NULL default '0',    PRIMARY KEY (cat_category, cat_sub_category))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_chasers (    id int(11) NOT NULL default '0',    last_chase_type char(1) NOT NULL default '',    renewal_password int(9) NOT NULL default '0',    PRIMARY KEY (id))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_comments (    comment_id int(11) unsigned NOT NULL AUTO_INCREMENT,    comment_ad_id int(11) unsigned NOT NULL default '0',    comment_user_id mediumint(8) NOT NULL default '0',    comment_username varchar(32) default NULL,    comment_user_ip varchar(8) NOT NULL default '',    comment_time int(11) unsigned NOT NULL default '0',    comment_text text,    comment_edit_time int(11) unsigned default NULL ,    comment_edit_count smallint(5) unsigned NOT NULL default '0',    comment_edit_user_id mediumint(8) default NULL,    PRIMARY KEY (comment_id),    KEY comment_ad_id (comment_ad_id),    KEY comment_user_id (comment_user_id),    KEY comment_user_ip (comment_user_ip),    KEY comment_time (comment_time))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_config (    config_name varchar(255) NOT NULL,    config_value varchar(255) NOT NULL,    PRIMARY KEY (config_name))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_details (    id int(11) NOT NULL default '0',    additional_info text NOT NULL ,    field_1 varchar(100) NOT NULL default '',    field_2 varchar(100) NOT NULL default '',    field_3 varchar(100) NOT NULL default '',    field_4 varchar(100) NOT NULL default '',    field_5 varchar(100) NOT NULL default '',    field_6 varchar(100) NOT NULL default '',    field_7 varchar(100) NOT NULL default '',    field_8 varchar(100) NOT NULL default '',    field_9 varchar(100) NOT NULL default '',    field_10 varchar(100) NOT NULL default '',    PRIMARY KEY (id))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_images (    id int(11) NOT NULL default '0',    img_seq_no int(11) NOT NULL AUTO_INCREMENT,    img_description text NOT NULL,    img_deleted_ind tinyint(1) NOT NULL default '0',    PRIMARY KEY (id, img_seq_no))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_paid_ads_config (    config_name varchar(255) NOT NULL default '',    config_value varchar(255) NOT NULL default '',    PRIMARY KEY (config_name))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_rate (    rate_ad_id int(11) unsigned NOT NULL default '0',    rate_user_id mediumint(8) NOT NULL default '0',    rate_user_ip char(8) NOT NULL default '',    rate_point tinyint(3) unsigned NOT NULL default '0',    KEY rate_ad_id (rate_ad_id),    KEY rate_user_id (rate_user_id),    KEY rate_user_ip (rate_user_ip),    KEY rate_point (rate_point))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_users (    users_user_id mediumint(8) NOT NULL default '0',    users_time int(11) NOT NULL default '0',    users_edit_time int(11) NOT NULL default '0',    users_balance smallint(6) NOT NULL default '0',    PRIMARY KEY (users_user_id))"; $sql[] = "CREATE TABLE " . $table_prefix . "ads_paypal_payments (    invoice INT UNSIGNED AUTO_INCREMENT,    receiver_email varchar(60),    item_name varchar(100),    item_number varchar(10),    quantity varchar(6),    payment_status varchar(10),    pending_reason varchar(10),    payment_date varchar(20),    mc_gross varchar(20),    mc_fee varchar(20),    tax varchar(20),    mc_currency varchar(3),    txn_id varchar(20),    txn_type varchar(10),    first_name varchar(30),    last_name varchar(40),    address_street varchar(50),    address_city varchar(30),    address_state varchar(30),    address_zip varchar(20),    address_country varchar(30),    address_status varchar(10),    payer_email varchar(60),    payer_status varchar(10),    payment_type varchar(10),    notify_version varchar(10),    verify_sign varchar(10),    referrer_id varchar(10),    PRIMARY KEY (invoice))"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('max_pics', '1024')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('ads_per_page', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('ad_duration_months', '3')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('board_disable', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('config_id', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('default_style', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('first_chase_days', '28')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('large_img_height', '480')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('large_img_width', '640')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('max_ads_per_user', '100')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('max_images_per_ad', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('medium_img_height', '200')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('medium_img_width', '200')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('second_chase_days', '14')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('thumb_img_height', '100')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('thumb_img_width', '100')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('rate_scale', '10')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('comment', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('rate', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('images', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('paid_ads', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('renewals', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('view_level', '-1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_config VALUES ('search_level', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_paid_ads_config VALUES ('currency_code', 'GBP')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_paid_ads_config VALUES ('language_code', 'GB')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_paid_ads_config VALUES ('business_email', <a>'websiteowner@hotmail.com</a>')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_paid_ads_config VALUES ('sandbox', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_paid_ads_config VALUES ('basic', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_paid_ads_config VALUES ('standard', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_paid_ads_config VALUES ('photo', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "ads_paid_ads_config VALUES ('premium', '1')";  for( $i = 0; $i <count>sql_query ($sql[$i]) )    {       $error = $db->sql_error();         echo '<li>' . $sql[$i] . '<br> +++ <font><b>Error:</b></font> ' . $error['message'] . '</li><br>';    }    else    {       echo '<li>' . $sql[$i] . '<br> +++ <font><b>Successfull</b></font></li><br>';    } }    echo '</ul></span></td></tr><tr><td> </td></tr>';  echo '<tr><th>End</th></tr><tr><td><span>Installation is now finished. Please be sure to delete this file now.<br>If you have run into any errors, please visit the <a>phpBBSupport.co.uk</a> and ask someone for help.</span></td></tr>'; echo '<tr><td><span><a>Have a nice day</a></span></td></table>';  include($phpbb_root_path . 'includes/page_tail.'.$phpEx);  ?>


for witch version is this?

Re: Classifieds Ad Mod Installation

PostPosted: Mon Aug 28, 2006 9:43 am
Author: MadUser
Hi
Well the mod is working i assume
but i dont understand how to get all the links from the overall_header.tpl
i see all kinds of variables like {U_INDEX} and {U_CLASSIFIED_ADS}
can someone tell me what are those variables and where do they come from?
i tought its from the ads_constants.php but its not.
so where is it come from?

Thanks

PostPosted: Sun Sep 03, 2006 11:58 am
Author: MadUser
another problem i got
it happens only when i am logged as a manager, and only in the first time i address the adverts.php
the error message goes like this:
time=1157313233
calc=1248678000
time=1157313233
calc=1169794800
time=1157313233
calc=1248678000
time=1157313233
calc=1167634800
time=1157313233
calc=1249196400

Warning: Cannot modify header information - headers already sent by (output started at /home/content/Z/3/5/Z35ap9xJH/html/im140/ads_mod/ads_renewal_mailer.php:60) in /home/content/Z/3/5/Z35ap9xJH/html/im140/includes/page_header.php on line 956

Warning: Cannot modify header information - headers already sent by (output started at /home/content/Z/3/5/Z35ap9xJH/html/im140/ads_mod/ads_renewal_mailer.php:60) in /home/content/Z/3/5/Z35ap9xJH/html/im140/includes/page_header.php on line 958

Warning: Cannot modify header information - headers already sent by (output started at /home/content/Z/3/5/Z35ap9xJH/html/im140/ads_mod/ads_renewal_mailer.php:60) in /home/content/Z/3/5/Z35ap9xJH/html/im140/includes/page_header.php on line 959

after a refresh it is ok
and regular user never see this error message
please help

PostPosted: Sat Sep 09, 2006 12:21 am
Author: Skywalker
"MadUser";p="14858" wrote:another problem i got
it happens only when i am logged as a manager, and only in the first time i address the adverts.php
the error message goes like this:
time=1157313233
calc=1248678000
time=1157313233
calc=1169794800
time=1157313233
calc=1248678000
time=1157313233
calc=1167634800
time=1157313233
calc=1249196400

Warning: Cannot modify header information - headers already sent by (output started at /home/content/Z/3/5/Z35ap9xJH/html/im140/ads_mod/ads_renewal_mailer.php:60) in /home/content/Z/3/5/Z35ap9xJH/html/im140/includes/page_header.php on line 956

Warning: Cannot modify header information - headers already sent by (output started at /home/content/Z/3/5/Z35ap9xJH/html/im140/ads_mod/ads_renewal_mailer.php:60) in /home/content/Z/3/5/Z35ap9xJH/html/im140/includes/page_header.php on line 958

Warning: Cannot modify header information - headers already sent by (output started at /home/content/Z/3/5/Z35ap9xJH/html/im140/ads_mod/ads_renewal_mailer.php:60) in /home/content/Z/3/5/Z35ap9xJH/html/im140/includes/page_header.php on line 959

after a refresh it is ok
and regular user never see this error message
please help

i've got the same error yesterday but then on adverts.php
whats your code in the page header on page_header.php on line 955 to 960

PostPosted: Sun Sep 10, 2006 11:47 am
Author: MadUser
i am not sure
when i open the file with notepad++, for some reason, it puts an empty line between every line there is, so when i look in those lines i cant see nothing important, 2 of this 3 lines are empty.
my page_header.php has got 2400 lines
but when i try to duble the line number to 1912, i get around this code that looks very suspicious :
Code: Select all
 if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))  {       header ('Cache-Control: no-cache, pre-check=0, post-check=0');  }  else  {       header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');  }  header ('Expires: 0');  header ('Pragma: no-cache');

PostPosted: Sun Sep 10, 2006 11:55 am
Author: Skywalker
"MadUser";p="15238" wrote:i am not sure
when i open the file with notepad++, for some reason, it puts an empty line between every line there is, so when i look in those lines i cant see nothing important, 2 of this 3 lines are empty.
my page_header.php has got 2400 lines
but when i try to duble the line number to 1912, i get around this code that looks very suspicious :
Code: Select all
 if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))  {       header ('Cache-Control: no-cache, pre-check=0, post-check=0');  }  else  {       header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');  }  header ('Expires: 0');  header ('Pragma: no-cache');

i've had troubles with that piece of code in the past multiple times and posted them here also... i dit not get a reaction or solution so i have comment that piece of code out in a couple of headers of mine, (i use more then one header) you can comment it out by adding "//" in front of it
another solution i do not know maybe the moderators or def team here do...
but comment that piece of code out will work as a temp solution...
i think i'm gonna have to do that in my page header also...

Re: Classifieds Ad Mod Installation

PostPosted: Sun Sep 10, 2006 12:00 pm
Author: Skywalker
"MadUser";p="14318" wrote:Hi
Well the mod is working i assume
but i dont understand how to get all the links from the overall_header.tpl
i see all kinds of variables like {U_INDEX} and {U_CLASSIFIED_ADS}
can someone tell me what are those variables and where do they come from?
i tought its from the ads_constants.php but its not.
so where is it come from?

Thanks


that variables are the page urls and come from your page header (page_header.php)
in page header you will find
'U_CLASSIFIED_ADS' => append_sid('adverts.'.$phpEx),

PostPosted: Sun Sep 10, 2006 12:09 pm
Author: MadUser
"Skywalker" wrote:
"MadUser";p="14318" wrote:Hi
Well the mod is working i assume
but i dont understand how to get all the links from the overall_header.tpl
i see all kinds of variables like {U_INDEX} and {U_CLASSIFIED_ADS}
can someone tell me what are those variables and where do they come from?
i tought its from the ads_constants.php but its not.
so where is it come from?

Thanks


that variables are the page urls and come from your page header (page_header.php)
in page header you will find
'U_CLASSIFIED_ADS' => append_sid('adverts.'.$phpEx),
Thanks, as a matter of fact, i figured it out couple days ago, i am a software programmer, but php is new to me, and i didnt understand the templates idea.
but now i think i do

about the cache code, i think we can manage without it, it looks like it caches the page to load from scratch. but i dont understand why only an admin get this error message.

i will ask it in phpaCA, maybe they will know what to to.

Thanks again.

Re: Classifieds Ad Mod Installation

PostPosted: Tue Sep 19, 2006 10:06 am
Author: BMD
Just did the install of this

went to set up my config for it and enter ad categories and I get the following when I click the links to CAts, Config, Paid Ads, and Payment History....


Template->make_filename(): Error - template file not found: admin/ads_categories_body.tpl

Template->make_filename(): Error - template file not found: admin/ads_config_body.tpl

Template->make_filename(): Error - template file not found: admin/ads_paid_ads_body.tpl

Template->make_filename(): Error - template file not found: admin/ads_payments_body.tpl


The templates are not there.


I checked the SQL database.... the tables are there

I called up the adverts.php directly and the page pops up no problem... when I tried to add an advertisement and select a category I get an error (because I have not created any categories.

I created some manually in SQL tables and get an error "Invalid selection" or some such....

I went back through everything step by step and i cant see as ive missed anything....
any ideas?

going to reconnect my back up files for this ... remove the tables and re-install the mod from scratch

PostPosted: Tue Sep 19, 2006 10:49 am
Author: MadUser
"BMD" wrote:Just did the install of this

went to set up my config for it and enter ad categories and I get the following when I click the links to CAts, Config, Paid Ads, and Payment History....


Template->make_filename(): Error - template file not found: admin/ads_categories_body.tpl

Template->make_filename(): Error - template file not found: admin/ads_config_body.tpl

Template->make_filename(): Error - template file not found: admin/ads_paid_ads_body.tpl

Template->make_filename(): Error - template file not found: admin/ads_payments_body.tpl


The templates are not there.


I checked the SQL database.... the tables are there

I called up the adverts.php directly and the page pops up no problem... when I tried to add an advertisement and select a category I get an error (because I have not created any categories.

I created some manually in SQL tables and get an error "Invalid selection" or some such....

I went back through everything step by step and i cant see as ive missed anything....
any ideas?

going to reconnect my back up files for this ... remove the tables and re-install the mod from scratch
What do you mean "the templates are not there"?
so where are they?
why didnt you put them there??
i dont understand you

Re: Classifieds Ad Mod Installation

PostPosted: Tue Sep 19, 2006 11:24 am
Author: BMD
Mad...

apparently the mod creates them...

I seem to have the mod working like a charm now....

It did not want to play well in the FI Themes...

I switched to subsilver....

Everthing worked in that style....
set up my config and cats etc..

switched nack to subice blue... everything works ther now as well....
very odd... but it works.

Re: Classifieds Ad Mod Installation

PostPosted: Tue Sep 19, 2006 2:30 pm
Author: BMD
OK

I spoke to soon.

I have only anomily .... I have ho Admin contols in any other theme than subSilver.

The user portion seems to be ok though.

I have to switch subSilver to get to my admin controls for the Classy Mod.

So I assume the problem lies in that portion of the install.....

PostPosted: Tue Sep 19, 2006 10:23 pm
Author: MadUser
"MadUser";p="14858" wrote:another problem i got
it happens only when i am logged as a manager, and only in the first time i address the adverts.php
the error message goes like this:
time=1157313233
calc=1248678000
time=1157313233
calc=1169794800
time=1157313233
calc=1248678000
time=1157313233
calc=1167634800
time=1157313233
calc=1249196400

Warning: Cannot modify header information - headers already sent by (output started at /home/content/Z/3/5/Z35ap9xJH/html/im140/ads_mod/ads_renewal_mailer.php:60) in /home/content/Z/3/5/Z35ap9xJH/html/im140/includes/page_header.php on line 956

Warning: Cannot modify header information - headers already sent by (output started at /home/content/Z/3/5/Z35ap9xJH/html/im140/ads_mod/ads_renewal_mailer.php:60) in /home/content/Z/3/5/Z35ap9xJH/html/im140/includes/page_header.php on line 958

Warning: Cannot modify header information - headers already sent by (output started at /home/content/Z/3/5/Z35ap9xJH/html/im140/ads_mod/ads_renewal_mailer.php:60) in /home/content/Z/3/5/Z35ap9xJH/html/im140/includes/page_header.php on line 959

after a refresh it is ok
and regular user never see this error message
please help


well, i found the solution to that problem.
i am amazed that i am the only one that noticed that.
anyway, this is the answer i got from the phpCA admin:

"Have a look in ads_mod/ads_renewal_mailer.php and you should find some echo statements that I'd left in by mistake. Just delete the lines (should be obvious which ones).

Pete"

he ment lines 60 and 61.

PostPosted: Fri Nov 02, 2007 5:07 am
Author: richiebgood
does this work with im1.41?