News:

Welcome to SMF Ads Support Forum

Main Menu
Coinbase

Error installing on SMF 1.1.4

Started by rtr2006, April 07, 2008, 04:32:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rtr2006

Hello, love the idea behind this mod.

I am getting an error while trying to install the mod.

Quote5.     Execute Modification     ./Themes/default/BoardIndex.template.php     Test failed

I am unsure what may have caused this.  I am running Tiny Portal 0.9.8 also.

I have a couple of other mods, but nothing significant.

Other mods:
Users Online Today Mod
SMF Shoutbox
Treasury
YouTube BBC Tag
Media Center
SMF 1.0.12 / 1.1.4 / 2.0 b1.1 Update    1.0
PM On Registration


Thank you for any help you can provide me, I have a BIG sponsor who wants to place an ad on my site.


no_quarter

I think I had the same problem, I get this error, I think there's something wrong in the 2nd "Add After" in the index.template.php file:
Parse error: syntax error, unexpected '<' in .../Themes/default/index.template.php on line 299

290:                            <span class="middletext">', $txt['smf52'], '</span>
291:                            <input type="hidden" name="hash_passwrd" value="" />
292:                         </form>';
293:    }
294:
295:    echo '
296:                      </td>
297: '; //Welcome Ads if (function_exists("show_welcomeAds")) { $ads = show_welcomeAds(); if(!empty($ads)) { echo '<td class="windowbg2">'; if($ads['type']==0) echo $ads['content']; else eval($ads['content']); echo '</td>'; } unset($ads); } echo '
298:
299:                   </tr>300:                </table>
301:             </td>

no_quarter

I think I found the error. When I pasted into index.template.php it was pasted as one line (don't know why), not pretty but working, except for this paste, because there should be a new line between Welcome Ads and if, otherwise the whole line is interpreted as a comment only.


no_quarter

#4
So now I've uploaded the files from the Zip, and I've edited the files and uploaded, and (see previous 2 posts) gotten rid of any obvious errors.

Next question, it might be simple but it's new to me, how do I run the queries below I need to, pasted at the bottom of this post? My web hoster who's an expert in extremely short and seldom useful answers for a novice like me, told me I had to go into phpmyadmin, go to the top of my homepage_smf, click SQL and then run it in there. Trying that I get:

Start of Error message.
CREATE TABLE IF NOT EXISTS {$db_prefix}ads(

ADS_ID mediumint( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
NAME tinytext NOT NULL ,
CONTENT text NOT NULL ,
BOARDS tinytext,
POSTS tinytext,
HITS mediumint( 8 ) NOT NULL default '0',
TYPE smallint( 4 ) NOT NULL default '0',
show_index smallint( 4 ) NOT NULL default '0',
show_board smallint( 4 ) NOT NULL default '0',
show_threadindex smallint( 4 ) NOT NULL default '0',
show_lastpost smallint( 4 ) NOT NULL default '0',
show_thread smallint( 4 ) NOT NULL default '0',
show_bottom smallint( 4 ) NOT NULL default '0',
show_welcome smallint( 4 ) NOT NULL default '0',
show_topofpage smallint( 4 ) NOT NULL default '0',
show_towerright smallint( 4 ) NOT NULL default '0',
show_towerleft smallint( 4 ) NOT NULL default '0',
show_betweencategories smallint( 4 ) NOT NULL default '0',
show_underchildren smallint( 4 ) NOT NULL default '0',
PRIMARY KEY ( ADS_ID )
)

MySQL returnerede: 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{$db_prefix}ads (
ADS_ID mediumint(8) unsigned NOT NULL auto_increment,
NAME t' at line 1
End of error message

Queries to be entered, I've only tried the first so far, results above
Query: [Select]
CREATE TABLE IF NOT EXISTS {$db_prefix}ads (
ADS_ID mediumint(8) unsigned NOT NULL auto_increment,
NAME tinytext NOT NULL,
CONTENT text NOT NULL,
BOARDS tinytext,
POSTS tinytext,
HITS mediumint(8) NOT NULL default '0',
TYPE smallint(4) NOT NULL default '0',
show_index smallint(4) NOT NULL default '0',
show_board smallint(4) NOT NULL default '0',
show_threadindex smallint(4) NOT NULL default '0',
show_lastpost smallint(4) NOT NULL default '0',
show_thread smallint(4) NOT NULL default '0',
show_bottom smallint(4) NOT NULL default '0',
show_welcome smallint(4) NOT NULL default '0',
show_topofpage smallint(4) NOT NULL default '0',
show_towerright smallint(4) NOT NULL default '0',
show_towerleft smallint(4) NOT NULL default '0',
show_betweencategories smallint(4) NOT NULL default '0',
show_underchildren smallint(4) NOT NULL default '0',
PRIMARY KEY (ADS_ID)
)
Query: [Select]
CREATE TABLE IF NOT EXISTS {$db_prefix}ads_settings (
variable tinytext NOT NULL,
value text NOT NULL,
PRIMARY KEY (variable(30))
)
Query: [Select]
ALTER IGNORE TABLE {$db_prefix}ads
ADD   show_lastpost smallint(4) NOT NULL default '0' AFTER show_threadindex
Query: [Select]
ALTER IGNORE TABLE {$db_prefix}ads
ADD   CATEGORY tinytext AFTER POSTS
Query: [Select]
ALTER IGNORE TABLE {$db_prefix}ads
ADD   show_underchildren smallint(4) NOT NULL default '0'
Query: [Select]
INSERT IGNORE INTO {$db_prefix}settings
(variable, value)
VALUES ('ads_displayAdsAdmin', '0'),
('ads_updateReports', '0'),
('ads_quickDisable', '0'),
('ads_lookLikePosts', '1')

no_quarter

Just a short comment, I now for the first time saw how the Ads Management part on my SMF Forum looks like. It's pure genius  8), looks very easy to use. Look forward to using once my problem above is solved. Thanks for developing this, again it's pure genius, should have been on the SMF from the start...

no_quarter

Please, can't anybody help? There must be a lot of people out there that's been through this and knows what to do??? I've tried several things for hours now, I hope I haven't messed too much up by now. Last thing I tried after some advice at work was to remove the {$db_prefix}, that enabled me to run the first query succesfully (at least no error messages), bu a few of the other still went wrong. What do I do? :'(

no_quarter

Found another post that recommended setting smf_ instead of {$db_prefix}. That helped, I can now run all queries except:
ALTER IGNORE TABLE {$db_prefix}ads
ADD   show_lastpost smallint(4) NOT NULL default '0' AFTER show_threadindex
and
ALTER IGNORE TABLE {$db_prefix}ads
ADD   show_underchildren smallint(4) NOT NULL default '0'

They give almost the same error message, namely
#1060 - Duplicate column name 'show_lastpost'
and
#1060 - Duplicate column name 'show_underchildren'

Status right now on using the ads admin is that all menus seem to be there, and I've tried Add Ads, however when I click Add in bottom right corner, nothing more happens. It's not even visible in Edit Ads. And of course no adds on my web page

I'm going to sleep now before I smash my computer... >:(

no_quarter

I see now that my whole Forum is down, what do I do?

Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.