Classifieds Ad Mod Installation

Mods etc.

Moderator: Integra Moderator

Classifieds Ad Mod Installation

PostAuthor: Tom_S » Sun May 14, 2006 2:34 pm

Has anyone firstly taken a look at this Classifieds Ad mod?
http://www.phpca.net/

If so was it a successful install.

It appears all should work with the exception of the modifications to the constants.php.

I am assuming the IM modifications needs to be made to a different file other than the constants.php. I need to know which file that is please and I will try to install this mod.

The statement I need to mod goes like this:

#-----[ OPEN ]-------------------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]----------------------------------------
#
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}

#
#-----[ AFTER, ADD ]----------------------------------
#
// Ads MOD
include($phpbb_root_path . 'ads_mod/ads_constants.' . $phpEx);


All other files looks as though the mod should work fine. I don't know that it will but in case here is the install for the mod]################################################################ MOD Title: phpCA Classified Ads for phpBB2## MOD Author: PeteMan <supportATphpca> (Peter Mansion) http://www.phpca.net ## MOD Description: phpBB-based Classified Ads System.#### MOD Version: 0.5.0#### Installation Level: medium## Installation Time: 15 minutes#################################################################### Files To Edit: 5##   includes/constants.php##   includes/page_header.php##   language/lang_english/lang_main.php##   templates/subSilver/overall_header.tpl##   templates/subSilver/subSilver.cfg#### Included Files: 55##   ads_comment.php##   ads_comment_delete.php##   ads_comment_edit.php##   ads_comment_create.php##   ads_comment_images.php##   ads_comment_item.php##   ads_comment_item_delete.php##   ads_comment_item_edit.php##   ads_comment_item_renewal.php##   ads_comment_item_status.php##   ads_comment_item_notify.php##   ads_comment_item_popup.php##   ads_comment_item_prices.php##   ads_comment_item_rss2.php##   ads_comment_item_search.php##   ads_comment_item_adverts.php##   ##   admin/admin_ads_categories.php##   admin/admin_ads_config.php####   ads_mod/ads_common.php##   ads_mod/ads_constants.php##   ads_mod/ads_functions.php##   ads_mod/ads_renewal_mailer.php####   language/lang_english/lang_admin_ads.php##   language/lang_english/lang_main_ads.php####   templates/subSilver/ads_calc_cost.tpl##   templates/subSilver/ads_calc_renewal_cost.tpl##   templates/subSilver/ads_comment_body.tpl##   templates/subSilver/ads_delete.tpl##   templates/subSilver/ads_delete_img.tpl##   templates/subSilver/ads_edit.tpl##   templates/subSilver/ads_images.tpl##   templates/subSilver/ads_input_detail.tpl##   templates/subSilver/ads_item.tpl##   templates/subSilver/ads_pre_create.tpl##   templates/subSilver/ads_pre_renew.tpl##   templates/subSilver/ads_prices.tpl##   templates/subSilver/ads_search.tpl##   templates/subSilver/ads_search_results.tpl##   templates/subSilver/adverts.tpl####   templates/subSilver/admin/ads_categories_body.tpl##   templates/subSilver/admin/ads_category_delete.tpl##   templates/subSilver/admin/ads_category_edit.tpl##   templates/subSilver/admin/ads_config_body.tpl####   templates/subSilver/images/icon_mini_ads.gif##   templates/subSilver/images/icon_mini_ads2.gif##   templates/subSilver/images/icon_mini_ads3.gif##   templates/subSilver/images/icon_mini_home.gif##   templates/subSilver/images/paypal_logo.gif##   templates/subSilver/images/rss2.gif####   templates/subSilver/images/lang_english/icon_active.gif##   templates/subSilver/images/lang_english/icon_images.gif##   templates/subSilver/images/lang_english/icon_renew.gif##   templates/subSilver/images/lang_english/icon_sold.gif##   templates/subSilver/images/lang_english/msg_newad.gif##   templates/subSilver/images/lang_english/msg_noimage.gif#### License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: #### Credits:#### Thanks to everyone at phpBB for writing such great code.##  ## Comments and installation scripts plus some great ideas ## for structuring this mod courtesy of smartor ## (smartor.is-root.com).    #### Thanks to those pioneers who have installed earlier ## of this script and provided some great ideas. Special thanks## to those who have provided translations of the language## files.#### ResizeImage function - based on an original script by## PHPGarage.com.    #### Image Popup function à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒ ¢Ã¢â€š ¬Ã…“ based on an original script by## codelifter.com.################################################################## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ##############################################################  ##-----[ OPEN ]-------------------------------------------------------#includes/constants.php  ##-----[ FIND ]----------------------------------------#if ( !defined('IN_PHPBB') ){     die("Hacking attempt");}  ##-----[ AFTER, ADD ]----------------------------------# // Ads MODinclude($phpbb_root_path . 'ads_mod/ads_constants.' . $phpEx);  ##-----[ OPEN ]-------------------------------------------------------#includes/page_header.php  ##-----[ FIND ]----------------------------------------#     'SITENAME' => $board_config['sitename'],  ##-----[ BEFORE, ADD ]----------------------------------#     //   Added for phpCA       'L_FORUM' => $lang['Forum'],     'L_CLASSIFIED_ADS' => $lang['classified_ads'],     'L_SEARCH_ADS' => $lang['search_ads'],     'L_MY_ADS' => $lang['my_ads'],     'U_CLASSIFIED_ADS' => append_sid('adverts.'.$phpEx),     'U_SEARCH_ADS' => append_sid('ads_search.'.$phpEx),     'U_MY_ADS' => append_sid('ads_search.'.$phpEx.'?search_name='.$userdata['username']),  ##-----[ OPEN ]-------------------------------------------------------# also for all other language packslanguage/lang_english/lang_main.php  ##-----[ FIND ]----------------------------------------#//// That's all, Folks!// -------------------------------------------------  ##-----[ BEFORE, ADD ]---------------------------------#//// phpCA//$lang['classified_ads'] = 'Classified Ads';$lang['search_ads'] = 'Search Ads';$lang['my_ads'] = 'My ads';  ##-----[ OPEN ]-------------------------------------------------------# also for other templatestemplates/subSilver/overall_header.tpl  ##-----[ FIND ]----------------------------------------#<a>  ##-----[ BEFORE, ADD ]---------------------------------#<a><img>{L_FORUM}</a>    ##-----[ FIND ]----------------------------------------#<tr>     <td><span>à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦ÃƒÆ’ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦ÃƒÆ’ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦</tr>  ##-----[ REPLACE WITH ]---------------------------------#<tr>     <td><span>à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦ÃƒÆ’ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦ÃƒÆ’ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦</tr>    ##-----[ AFTER, ADD ]----------------------------------# this step will add a link into your header menu  <tr>         <td><span>     <a><img>{L_CLASSIFIED_ADS}</a>       <a><img>{L_SEARCH_ADS}</a>       <BEGIN>     <a><img>{L_MY_ADS}</a> </span></td>     <END></tr>      ##-----[ OPEN ]-------------------------------------------------------# also for other templatestemplates/subSilver/subSilver.cfg  ##-----[ FIND ]----------------------------------------#?>  ##-----[ BEFORE, ADD ]---------------------------------#// Ads Mod$images['noimage'] = "$current_template_images/{LANG}/noimage.gif";$images['paypal_logo'] = "$current_template_images/paypal_logo.gif";$images['msg_newad'] = "$current_template_images/{LANG}/msg_newad.gif";$images['icon_images'] = "$current_template_images/{LANG}/icon_images.gif";$images['icon_renew'] = "$current_template_images/{LANG}/icon_renew.gif";$images['icon_sold'] = "$current_template_images/{LANG}/icon_sold.gif";$images['icon_active'] = "$current_template_images/{LANG}/icon_active.gif";  ##-----[ COPY ]-------------------------------------------------------# These following instructions mean...# Upload all files in directory "phpbb_root" with their structure to your phpBB root directory## Remember to upload all the language files and template files to all your# language packs and template directories## If you use FTP please remember to use ASCII mode for text files (*.php, *.tpl)# and BINARY mode for image files (*.jpg, *.gif)# Fortunately good FTP clients today can auto-detect the mode for your files  copy phpbb_root/*.php to *.phpcopy phpbb_root/admin/*.php to admin/copy phpbb_root/ads_mod/*.* to ads_mod/copy phpbb_root/language/lang_english/*.php to language/lang_english/copy phpbb_root/templates/subSilver/*.* to templates/subSilver/copy phpbb_root/templates/subSilver/admin/*.* to templates/subSilver/admin/copy phpbb_root/templates/subSilver/images/*.* to templates/subSilver/images/copy phpbb_root/templates/subSilver/images/lang_english/*.* to templates/subSilver/images/lang_english/  ##-----[ DIY INSTRUCTIONS ]------------------------------------------## Create folder: ads_mod/chasers# Create folder: ads_mod/images# Create folder: ads_mod/payments (if using paid ads)  ##-----[ DIY INSTRUCTIONS ]------------------------------------------## Required for Unix hosts (you can use your FTP client to do this)## CHMOD 777 ads_mod/chasers# CHMOD 777 ads_mod/images# CHMOD 777 ads_mod/payments (if using paid ads)  ##-----[ SQL ]--------------------------------------------------------## This Ads mod will add 10 tables to your database.# It will not alter any existing tables :)## Upload ads_db_install.php and ads_mysql.sql to your phpBB root# directory then run ads_db_install.php by typing on the browser# After that, delete both files immediately## If you do not want to run ads_db_install.php you can run the SQL# queries manually in ads_mysql.sql###########  # After installation, go to your Admin Control Panel and customise # your set-up.#  ##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------## EoM[/code]

Thanks in advance...

Tom

EDIT: email addresses [url=http]modified[/url] by Adrian
Last edited by Tom_S on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
<img>

Tom_S
Integra Supporter
Integra Supporter
 
Posts: 62
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Wed Apr 26, 2006 8:23 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: Helter » Sun May 14, 2006 2:52 pm

try this
FIND

Code: Select all
<?php// <ID>// +---------------+-------------------------------+-----------+// | IntegraMOD v1 |    ÃƒÆ’‚ © 2005 IntegraMOD Group    |  {1.4.0}  |// +---------------+-------------------------------+-----------+// | Filename      | constants.php                             |// | Created By    | phpBB Group                               |// | Created On    | February 13, 2001                         |// | Copyright     |  © 2005 phpBB Group                        |// | License       | GNU-GPL v2 [http]    |// +---------------+-------------------------------------------+// |      DO NOT MODIFY/REMOVE ANTHING ABOVE THIS LINE!!!      |// +-----------------------------------------------------------+  // *************************************************************// ****************** Begin Protecting Script ******************// *************************************************************/*if (!defined('IM_LOADER') or !IM_LOADER or !defined('IM_GLOBALS') or !IM_GLOBALS){     die('<p><strong>Access Denied:</strong> This file ('.basename(__FILE__).') cannot be accessed directly.</p>');}*/  // *************************************************************// ******************* Set Global Constants ********************// *************************************************************

REPLACE WITH

Code: Select all
<?php// <ID>// +---------------+-------------------------------+-----------+// | IntegraMOD v1 |    ÃƒÆ’‚ © 2005 IntegraMOD Group    |  {1.4.0}  |// +---------------+-------------------------------+-----------+// | Filename      | constants.php                             |// | Created By    | phpBB Group                               |// | Created On    | February 13, 2001                         |// | Copyright     |  © 2005 phpBB Group                        |// | License       | GNU-GPL v2 [http]    |// +---------------+-------------------------------------------+// |      DO NOT MODIFY/REMOVE ANTHING ABOVE THIS LINE!!!      |// +-----------------------------------------------------------+  // *************************************************************// ****************** Begin Protecting Script ******************// *************************************************************/*if (!defined('IM_LOADER') or !IM_LOADER or !defined('IM_GLOBALS') or !IM_GLOBALS){     die('<p><strong>Access Denied:</strong> This file ('.basename(__FILE__).') cannot be accessed directly.</p>');}*/  // *************************************************************// ******************* Set Global Constants ********************// *************************************************************if ( !defined('IN_PHPBB') ){     die("Hacking attempt");     exit;}  // Ads MODinclude($phpbb_root_path . 'ads_mod/ads_constants.' . $phpEx);
Last edited by Helter on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
"Success is getting what you want. Happiness is wanting what you get." - Dale Carnegie
User avatar
Helter
Administrator
Administrator
 
Posts: 4554
Likes: 40 posts
Liked in: 116 posts
Images: 0
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 1,959.15
Location: Seattle Wa
IntegraMOD version: phpBB2x

Re: Classifieds Ad Mod Installation

PostAuthor: Tom_S » Sun May 14, 2006 2:53 pm

Thanks my friend. I am on my way to try the install now. I will report back if it is indeed a successful install.
Last edited by Tom_S on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
<img>

Tom_S
Integra Supporter
Integra Supporter
 
Posts: 62
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Wed Apr 26, 2006 8:23 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: Helter » Sun May 14, 2006 3:00 pm

the die hacking edit was added by Teelk for the 141 version and it works. I dont see any reason it wouldnt work for 140 <img>
Last edited by Helter on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
"Success is getting what you want. Happiness is wanting what you get." - Dale Carnegie
User avatar
Helter
Administrator
Administrator
 
Posts: 4554
Likes: 40 posts
Liked in: 116 posts
Images: 0
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 1,959.15
Location: Seattle Wa
IntegraMOD version: phpBB2x

Re: Classifieds Ad Mod Installation

PostAuthor: Tom_S » Sun May 14, 2006 3:14 pm

Oops...One thing I don't know how to do is ad this so it shows up in the slide menu in the ACP. I don't see it to configure it so I am stuck for the moment.
Last edited by Tom_S on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
<img>

Tom_S
Integra Supporter
Integra Supporter
 
Posts: 62
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Wed Apr 26, 2006 8:23 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: Helter » Sun May 14, 2006 3:21 pm

put the root/admin files in root/admin and root/admin/modules
Last edited by Helter on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
"Success is getting what you want. Happiness is wanting what you get." - Dale Carnegie
User avatar
Helter
Administrator
Administrator
 
Posts: 4554
Likes: 40 posts
Liked in: 116 posts
Images: 0
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 1,959.15
Location: Seattle Wa
IntegraMOD version: phpBB2x

Re: Classifieds Ad Mod Installation

PostAuthor: Tom_S » Sun May 14, 2006 3:23 pm

Got it..Thanks <img>
Last edited by Tom_S on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
<img>

Tom_S
Integra Supporter
Integra Supporter
 
Posts: 62
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Wed Apr 26, 2006 8:23 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: Tom_S » Sun May 14, 2006 4:53 pm

Okay. I have it setup and working. I am not sure how to get all the links you are supposed to add in the overall_header into the Navigation menu but I did get the two main ones which are getting to the classifieds and using the search.

I did get an error when trying to edit a category in the ACP by adding new fields. The error was:

[color=red]Failed to update categories row

DEBUG MODE

SQL Error ]

The fix for it is:

Open admin_ads_categories.php

Find:
Code: Select all
$category = htmlspecialchars($HTTP_POST_VARS[category]);          $sub_category = htmlspecialchars($HTTP_POST_VARS[sub_category]);          $basic_cost = htmlspecialchars($HTTP_POST_VARS[basic_cost]);          $standard_cost = htmlspecialchars($HTTP_POST_VARS[standard_cost]);          $photo_cost = htmlspecialchars($HTTP_POST_VARS[photo_cost]);          $premium_cost = htmlspecialchars($HTTP_POST_VARS[premium_cost]);


Replace]         if ( file_exists("admin_ads_paid_ads.$phpEx") )          {             $basic_cost = htmlspecialchars($HTTP_POST_VARS[basic_cost]);             $standard_cost = htmlspecialchars($HTTP_POST_VARS[standard_cost]);             $photo_cost = htmlspecialchars($HTTP_POST_VARS[photo_cost]);             $premium_cost = htmlspecialchars($HTTP_POST_VARS[premium_cost]);          }          else          {             $basic_cost = '0';             $standard_cost = '0';             $photo_cost = '0';             $premium_cost = '0';          }            $category = htmlspecialchars($HTTP_POST_VARS[category]);          $sub_category = htmlspecialchars($HTTP_POST_VARS[sub_category]);[/code]

I submitted an ad to see if it works and so far it is.

I will report anything new. So far so good. <img>
Last edited by Tom_S on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
<img>

Tom_S
Integra Supporter
Integra Supporter
 
Posts: 62
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Wed Apr 26, 2006 8:23 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: doswald » Wed May 31, 2006 8:19 pm

After I install this MOD, I've got an error (please refer to my linked image)

Also, when I try to set the values in ACP> Classified Ads> Configuration all setting that I configured returns to its default (after I configure them all)

[flash=,:1soumd5h]http://i19.photobucket.com/albums/b164/doswald/PHPBB/Ads.jpg[/flash:1soumd5h]
Last edited by doswald on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
One of the best ways to educate our hearts is to look at our interaction with other people, because our relationships with others are fundamentally a reflection of our relationship with ourselves.
--Stephen R. Covey First Things First--
User avatar
doswald
Integra Member
Integra Member
 
Posts: 165
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue May 09, 2006 9:33 pm
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: doswald » Wed May 31, 2006 11:51 pm

Thanks it work now, I figured it out, the error above resolves by manually creating the tables. The second one (w/c is in below) was resolve by modifying the adverts.tpl and changing the path to fisubice


===============END LINE======================

However, this problem was appeared, remember I created tables manually and when I try to create the table for phpbb_ads_images an error appeared

[color=red]MySQL said]
Last edited by doswald on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
One of the best ways to educate our hearts is to look at our interaction with other people, because our relationships with others are fundamentally a reflection of our relationship with ourselves.
--Stephen R. Covey First Things First--
User avatar
doswald
Integra Member
Integra Member
 
Posts: 165
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue May 09, 2006 9:33 pm
Cash on hand: 0.00

PostAuthor: Tom_S » Sun Jun 04, 2006 3:26 am

Sorry. I meant to lend a hand on that. I got back logged and didn't get a chance.

I didn't get that error "1075" but I did create the tables running the ads_mysql.sql in phpMyAdmin with no problem. You may want to drop the tables you manually created and run that file. It is in the scripts directory of the mod download.
Last edited by Tom_S on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
<img>

Tom_S
Integra Supporter
Integra Supporter
 
Posts: 62
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Wed Apr 26, 2006 8:23 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: SLY LS1 » Sun Jun 04, 2006 3:43 am

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);  ?>
Last edited by SLY LS1 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

SLY LS1
Members
Members
 
Posts: 70
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Sun Apr 09, 2006 12:49 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: doswald » Sun Jun 04, 2006 6:27 pm

Thanks Tom, Thanks SLY. I still have an error when I try to run your script SLY, here

Parse error: parse error, expecting `T_VARIABLE' or `'$'' in D:CPGARCIATEST Integramoddb_update1.php on line 39


I tried also the script provided (updated) from PCPCA.net

This one

<?php
/***************************************************************************
* db_update.php
* -------------------
*
* copyright : ÂÂÂ ©2003 Freakin' Booty ;-P & Antony Bailey
* project : http://sourceforge.net/projects/dbgenerator
* Website : http://freakingbooty.no-ip.com/ & http://www.rapiddr3am.net
*
***************************************************************************/

/***************************************************************************
*
* 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);

?>


However, this error still appears, please look into the image

[flash=,:3gudovy4]http://i19.photobucket.com/albums/b164/doswald/PHPBB/ads_image.jpg[/flash:3gudovy4]

I hope you can help me guys.

Thanks in advance.

Cheers <img>
Last edited by doswald on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
One of the best ways to educate our hearts is to look at our interaction with other people, because our relationships with others are fundamentally a reflection of our relationship with ourselves.
--Stephen R. Covey First Things First--
User avatar
doswald
Integra Member
Integra Member
 
Posts: 165
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue May 09, 2006 9:33 pm
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: SLY LS1 » Mon Jun 05, 2006 5:12 am

"doswald";p="8446" wrote:Thanks Tom, Thanks SLY. I still have an error when I try to run your script SLY, here


Parse error: parse error, expecting `T_VARIABLE' or `'$'' in D:CPGARCIATEST Integramoddb_update1.php on line 39


Ok, im not an expert in this stuff but line 39 is as below

header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));

I notice is says "db_update.$php

And I notice that you called yours db_update1.php

Maybe its that ?
Last edited by SLY LS1 on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

SLY LS1
Members
Members
 
Posts: 70
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Sun Apr 09, 2006 12:49 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: doswald » Mon Jun 05, 2006 5:10 pm

Hi SLY thanks for your reply, I did also the original file name db_update.php but seems the error is the same.

Wondering what's happening in the code.
Last edited by doswald on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
One of the best ways to educate our hearts is to look at our interaction with other people, because our relationships with others are fundamentally a reflection of our relationship with ourselves.
--Stephen R. Covey First Things First--
User avatar
doswald
Integra Member
Integra Member
 
Posts: 165
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue May 09, 2006 9:33 pm
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: MadUser » Tue Aug 15, 2006 2:39 am

can someone please post a link to his web site
i want to see the mod in action
<img>
Last edited by MadUser on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]My hebrew web site[/url]
User avatar
MadUser
Integra Member
Integra Member
 
Posts: 113
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue Jul 11, 2006 12:26 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: Skywalker » Thu Aug 17, 2006 4:35 am

"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?
Last edited by Skywalker on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Fri Apr 14, 2006 5:25 pm
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: MadUser » Mon Aug 28, 2006 10:43 am

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
Last edited by MadUser on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]My hebrew web site[/url]
User avatar
MadUser
Integra Member
Integra Member
 
Posts: 113
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue Jul 11, 2006 12:26 am
Cash on hand: 0.00

PostAuthor: MadUser » Sun Sep 03, 2006 12:58 pm

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
Last edited by MadUser on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]My hebrew web site[/url]
User avatar
MadUser
Integra Member
Integra Member
 
Posts: 113
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue Jul 11, 2006 12:26 am
Cash on hand: 0.00

PostAuthor: Skywalker » Sat Sep 09, 2006 1:21 am

"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
Last edited by Skywalker on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Fri Apr 14, 2006 5:25 pm
Cash on hand: 0.00

PostAuthor: MadUser » Sun Sep 10, 2006 12:47 pm

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');
Last edited by MadUser on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]My hebrew web site[/url]
User avatar
MadUser
Integra Member
Integra Member
 
Posts: 113
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue Jul 11, 2006 12:26 am
Cash on hand: 0.00

PostAuthor: Skywalker » Sun Sep 10, 2006 12:55 pm

"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...
Last edited by Skywalker on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Fri Apr 14, 2006 5:25 pm
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: Skywalker » Sun Sep 10, 2006 1:00 pm

"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),
Last edited by Skywalker on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Fri Apr 14, 2006 5:25 pm
Cash on hand: 0.00

PostAuthor: MadUser » Sun Sep 10, 2006 1:09 pm

"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.
Last edited by MadUser on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]My hebrew web site[/url]
User avatar
MadUser
Integra Member
Integra Member
 
Posts: 113
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue Jul 11, 2006 12:26 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: BMD » Tue Sep 19, 2006 11:06 am

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
Last edited by BMD on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

BMD
Members
Members
 
Posts: 84
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Thu Aug 24, 2006 5:12 am
Cash on hand: 0.00

PostAuthor: MadUser » Tue Sep 19, 2006 11:49 am

"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
Last edited by MadUser on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]My hebrew web site[/url]
User avatar
MadUser
Integra Member
Integra Member
 
Posts: 113
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue Jul 11, 2006 12:26 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: BMD » Tue Sep 19, 2006 12:24 pm

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.
Last edited by BMD on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

BMD
Members
Members
 
Posts: 84
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Thu Aug 24, 2006 5:12 am
Cash on hand: 0.00

Re: Classifieds Ad Mod Installation

PostAuthor: BMD » Tue Sep 19, 2006 3:30 pm

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.....
Last edited by BMD on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

BMD
Members
Members
 
Posts: 84
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Thu Aug 24, 2006 5:12 am
Cash on hand: 0.00

PostAuthor: MadUser » Tue Sep 19, 2006 11:23 pm

"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.
Last edited by MadUser on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http]My hebrew web site[/url]
User avatar
MadUser
Integra Member
Integra Member
 
Posts: 113
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue Jul 11, 2006 12:26 am
Cash on hand: 0.00

PostAuthor: richiebgood » Fri Nov 02, 2007 6:07 am

does this work with im1.41?
Last edited by richiebgood on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

richiebgood
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Tue Aug 08, 2006 1:01 am
Cash on hand: 0.00
Location: Ireland

Re: Classifieds Ad Mod Installation

PostAuthor: IceWind » Thu Nov 06, 2008 1:30 pm

Hi,

I was trying to install this mod in im 1.4.1, so far i copied all the stuff and created the needed DB tables.
Thing is the changes needed to be made on some files i can't make them, the ones to show the links. I can't even find the reference code lines. <img>

How did you guys resolved this problem? Because not even in the admin area they show up.

But at least the mod itself is working ok, if i manually call the .php files it works prefectly.

Thanks.

IceWind
Newbie
Newbie
 
Posts: 12
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Fri Aug 11, 2006 2:16 pm
Cash on hand: 0.00
Location: Ireland

Re: Classifieds Ad Mod Installation

PostAuthor: Helter » Thu Nov 06, 2008 4:39 pm

to make the admin files show up, copy them to both the root admin/ folder and admin/modules/ so you will actually use admin files twice. to add the link to them, use
admin/general admin/qbar/Menu (for the top link, or
admin/general admin/qbar/Board Navigation (for the navigation block
"Success is getting what you want. Happiness is wanting what you get." - Dale Carnegie
User avatar
Helter
Administrator
Administrator
 
Posts: 4554
Likes: 40 posts
Liked in: 116 posts
Images: 0
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 1,959.15
Location: Seattle Wa
IntegraMOD version: phpBB2x

Re: Classifieds Ad Mod Installation

PostAuthor: DjPorkchop » Thu Nov 06, 2008 6:43 pm

I have this installed on 1 of my IM 1.4.1 installs and it works perfect as is from the install package.EXCEPT I had to run the sql querys in phpMyadmin. I installed it on another IM 1.4.1 and it works great there as well. However, We installed the paid ads code that the author requires to be paid for and it does not charge correctly through paypal. Other then that, the basic install works just fine. You will need to do a couple creative searches.

A working example is at http://www.wecame2play.com ( In Dev ) and http://www.littleelmforums.com
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
DjPorkchop
Administrator
Administrator
 
Posts: 1592
Likes: 135 posts
Liked in: 26 posts
Images: 0
Joined: Fri Apr 21, 2006 7:59 pm
Cash on hand: 1,570.25
Location: Illinois
IntegraMOD version: phpBB2x

Re: Classifieds Ad Mod Installation

PostAuthor: IceWind » Thu Nov 06, 2008 7:05 pm

Hi HelterSkelter,

Thanks for the help!
Regarding the ACP worked perfectly!

As for the links using the qbar was my fallback plan. <img>

Anyway it is working all perfectly now, i may need to do some adjutments.
This mod as some bugs, but that is normal. Like when deleting a category all the items assigned to it continue as so, and next time we try to access them to edit we got a SQL error.

IceWind
Newbie
Newbie
 
Posts: 12
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Fri Aug 11, 2006 2:16 pm
Cash on hand: 0.00
Location: Ireland


Return to IntegraMOD Modifications

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot], Majestic-12 [Bot]