Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
[Solved] Any idea?
Post new topic   Reply to topic View previous topic :: View next topic
Goto page: 1, 2  Next
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
[Solved] Any idea?
PostPosted: 04/07/2007 7:12 AM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:15 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Here is the Colorize Forumtitle MOD and I get only few errors which were fixed. Only 1 I was unable to fix it.

Code:
##############################################################
## MOD Title:      Colorize Forumtitle
## MOD Author: OXPUS < > (Karsten Ude) http://www.oxpus.de
## MOD Description:   Gives admins the possibility to enter a color seperatly for each forumtitle.
## MOD Version:      1.0.0
##
## Installation Level:   Easy
## Installation Time:   3-5 Minutes
## Files To Edit:   7
##         index.php
##         admin/admin_forums.php
##         language/lang_english/lang_admin.php
##         language/lang_german/lang_admin.php
##         templates/subSilver/index_body.tpl
##         templates/subSilver/admin/forum_admin_body.tpl
##         templates/subSilver/admin/forum_edit_body.tpl
##
## Included Files:   n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## Instead entering the given SQL-Statement, you can upload the file db_update.php
## to your phpbb root directory and run this with your browser.
## This file will do all nessassary changes in the database for you.
## After using this file, please delete it to avoid errors.
##
## If you have installed the Categories Hierarchy Mod, ONLY install the add-on!
##
##############################################################
## MOD History:
##
##   2004-05-12 - Version 1.0.0
##      - First release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_forums ADD COLUMN forum_color varchar(6) DEFAULT '' NOT NULL;

#
#-----[ OPEN ]------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------
#
                        'FORUM_NAME' => $forum_data[$j]['forum_name'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
                        'FORUM_COLOR' => ( $forum_data[$j]['forum_color'] != '' ) ? 'style="color: #'.$forum_data[$j]['forum_color'].'"' : '',

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_forums.php

#
#-----[ FIND ]------------------------------------------
#
            $forumdesc = $row['forum_desc'];
            $forumstatus = $row['forum_status'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
            $forum_color = $row['forum_color'];

#
#-----[ FIND ]------------------------------------------
#
            $forumdesc = '';

#
#-----[ AFTER, ADD ]------------------------------------------
#
            $forum_color = '';

#
#-----[ FIND ]------------------------------------------
#
         $forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected=\"selected\"" : $forumunlocked = "selected=\"selected\"";

#
#-----[ AFTER, ADD ]------------------------------------------
#
         $forum_color = ( empty($forum_color) ) ? '' : $forum_color;

#
#-----[ FIND ]------------------------------------------
#
            'L_FORUM_TITLE' => $l_title,

#
#-----[ AFTER, ADD ]------------------------------------------
#
            'L_FORUM_COLOR' => $lang['Forum_color'],
            'L_FORUM_COLOR_EXPLAIN' => $lang['Forum_color_explain'],

#
#-----[ FIND ]------------------------------------------
#
            'FORUM_NAME' => $forumname,

#
#-----[ AFTER, ADD ]------------------------------------------
#
            'FORUM_COLOR' => $forum_color,

#
#-----[ FIND ]------------------------------------------
#
         $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
            VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";

#
#-----[ IN-LINE FIND ]------------------------------------------
#
, forum_name

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, forum_color

#
#-----[ IN-LINE FIND ]------------------------------------------
#
'" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $HTTP_POST_VARS['forum_color']) . "'

#
#-----[ FIND ]------------------------------------------
#
         $sql = "UPDATE " . FORUMS_TABLE . "
            SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
            WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);

#
#-----[ IN-LINE FIND ]------------------------------------------
#
forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, forum_color = '" . str_replace("\'", "''", $HTTP_POST_VARS['forum_color']) . "'

#
#-----[ FIND ]------------------------------------------
#
               'FORUM_NAME' => $forum_rows[$j]['forum_name'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
               'FORUM_COLOR' => ( $forum_rows[$j]['forum_color'] != '' ) ? 'style="color: #'.$forum_rows[$j]['forum_color'].'"' : '',

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Forum_edit_delete_explain'] = 'The form below will allow you to customize all the general board options. For User and Forum configurations use the related links on the left hand side';

#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Forum_color'] = 'Set a color for the forum title';
$lang['Forum_color_explain'] = 'Leave this field blank to use the default color. Just enter the color number without leading \'#\'!';

#
#-----[ OPEN ]------------------------------------------
#
language/lang_german/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Forum_edit_delete_explain'] = 'Hier kannst du alle allgemeinen Boardeinstellungen anpassen. Zur Benutzer- und Forenkonfiguration benutze bitte die entsprechenden Links auf der linken Seite';

#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Forum_color'] = 'Trage eine Farbe für den Forentitel ein.';
$lang['Forum_color_explain'] = 'Lass das Feld frei, um die Standardfarbe zu verwenden. Gib nur die Farbzahl ohne führende \'#\' ein!';

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#
 <span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a>

#
#-----[ REPLACE WITH ]------------------------------------------
#
 <span {catrow.forumrow.FORUM_COLOR} class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" {catrow.forumrow.FORUM_COLOR}  class="forumlink">{catrow.forumrow.FORUM_NAME}</a>

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/forum_admin_body.tpl

#
#-----[ FIND ]------------------------------------------
#
      <td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>

#
#-----[ REPLACE WITH ]------------------------------------------
#
      <td class="row2"><span {catrow.forumrow.FORUM_COLOR} class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new" {catrow.forumrow.FORUM_COLOR}>{catrow.forumrow.FORUM_NAME}</a></span>< br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/forum_edit_body.tpl

#
#-----[ FIND ]------------------------------------------
#
   <tr>
     <td class="row1">{L_FORUM_STATUS}</td>
     <td class="row2"><select name="forumstatus">{S_STATUS_LIST}</select></td>
   </tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
   <tr>
     <td class="row1" width="30%">{L_FORUM_COLOR}<br /><span class="gensmall">{L_FORUM_COLOR_EXPLAIN}</span></td>
     <td class="row2"><input type="text" size="10" maxlength="6" name="forum_color" value="{FORUM_COLOR}" class="post" /></td>
   </tr>


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



Code:
Critical Error

IN-LINE FIND FAILED: In file [admin/admin_forums.php] could not find:

'" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "'

MOD script line #142 :: FAQ :: Report
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Any idea?
PostPosted: 04/07/2007 12:12 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:15 PM
Location: St Pete, FL
peace.gif
Ok, try this:

OPEN
Colorize Forumtitle MOD script...

FIND
Code:
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "'

REPLACE WITH
Code:
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$HTTP_POST_VARS['forumname']) . "'

Save, upload, and try again using EM...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Any idea?
PostPosted: 04/07/2007 1:47 PM Reply with quote
Citation
poomerio
Citation
Posts 407
Word Cnt. 10,993
BDay May 28
Sign Gemini
Sex Sex:Male
Joined: Feb 25, 2007
Local time: 7:15 PM
Location: SE England
greatbrE.gif
NR, I tried that last night when AB asked me to help him.
I found thta it can't FIND this part:
Code:
. "'


Hope it helped Smile

- Poomie
Back to Top
View user's profile Find all posts by poomerio Send private message   Phoogle Map
Re: Any idea?
PostPosted: 04/07/2007 2:04 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:15 PM
Location: St Pete, FL
peace.gif
So did you fix the problem???

dontknow
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Any idea?
PostPosted: 04/07/2007 2:38 PM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:15 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
No it didn't fix from Poomerio.

Now it gives me

Code:
$HTTP_POST_VARS['forumname']) . "'
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Any idea?
PostPosted: 04/07/2007 3:05 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:15 PM
Location: St Pete, FL
peace.gif
Ok, try this:

OPEN
Colorize Forumtitle MOD script...

FIND
Code:
#
#-----[ FIND ]------------------------------------------
#
         $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
            VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";

#
#-----[ IN-LINE FIND ]------------------------------------------
#
, forum_name

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, forum_color

#
#-----[ IN-LINE FIND ]------------------------------------------
#
'" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $HTTP_POST_VARS['forum_color']) . "'

REPLACE WITH
Code:
#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . FORUMS_TABLE
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, forum_name
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, forum_color
#
#-----[ FIND ]------------------------------------------
#
VALUES
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, " . $new_cat
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $HTTP_POST_VARS['forum_color']) . "'

Save, upload, and try again using EM...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Any idea?
PostPosted: 04/07/2007 3:18 PM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:15 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Oh yeah, It worked but now forum is messed up. All the categories up and down. Forum is like gone. Can it be fixed or i should restore the backups ?
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Any idea?
PostPosted: 04/07/2007 3:41 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:15 PM
Location: St Pete, FL
peace.gif
Restore the EM Backups, then we can try to figure out what caused that...

Brick wall
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Any idea?
PostPosted: 04/07/2007 3:48 PM Reply with quote
Citation
abdulbasit
Citation
Posts 1017
Word Cnt. 64,643
BDay Apr 18
Sign Aries
Sex Sex:Male
Joined: Apr 01, 2007
Local time: 11:15 PM
Location: UNITED ARAB EMIRATES
unitedACa.gif
I have restored the backups and it is normal. When it was corrupted i changed the color and it changed Very Happy but the forum was still the same messy. Categories ups n down and all...
Back to Top
View user's profile Find all posts by abdulbasit Send private message [ Hidden ] Visit poster's website Yahoo Messenger MSN Messenger
Re: Any idea?
PostPosted: 04/07/2007 4:18 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:15 PM
Location: St Pete, FL
peace.gif
Here is the mistake:

Ok, try this:

OPEN
Mod-colorize_forumtitle.txt

FIND
Code:
#
#-----[ FIND ]------------------------------------------
#
 <span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a>

#
#-----[ REPLACE WITH ]------------------------------------------
#
 <span {catrow.forumrow.FORUM_COLOR} class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" {catrow.forumrow.FORUM_COLOR}  class="forumlink">{catrow.forumrow.FORUM_NAME}</a>

REPLACE WITH
Code:
#
#-----[ FIND ]------------------------------------------
#
<span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
<span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a>
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
<span {catrow.forumrow.FORUM_COLOR} class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" {catrow.forumrow.FORUM_COLOR}  class="forumlink">{catrow.forumrow.FORUM_NAME}</a>

Save, upload, and try again using EM...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support

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


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.1649s (PHP: 46% - SQL: 54%) - SQL queries: 57 - GZIP disabled - Debug on