Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
Need to change just hyperlink
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
Need to change just hyperlink
PostPosted: 08/15/2007 4:47 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: 2:21 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Hello Nightrider,

In my FunWadi forum index you will see a category name "Shair-o-Shairi"
Is it possible to change the current hyperlink of "Shair-o-Shairi" to http://www.shair-o-shairi.com and If possible, please let me know how to change it so that I can change for others If needed to be change in future.

Boo hoo!
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: Need to change just hyperlink
PostPosted: 08/15/2007 10:34 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: 6:21 PM
Location: St Pete, FL
peace.gif
Normally this would be simple, but the SEO MODs that you have installed make it so I'm not sure this will work.  You can try it and find out...

If I needed to do something like this, I would add a new field in my phpbb_forums table and name it something like remote_url.  Then I would enter the http://www.shair-o-shairi.com path next to the Shair-o-Shairi forum.  Then I would make the following changes in my index.php file:

OPEN
index.php

FIND
Code:
$template->assign_block_vars('catrow.forumrow',   array(

BEFORE, ADD
Code:
$forum_path = ( trim($forum_data[$j]['remote_url'] == '') ? append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id")) : $forum_data[$j]['remote_url'];

FIND
Code:
'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))

REPLACE WITH
Code:
'U_VIEWFORUM' => $forum_path)

FIND
Code:
// Append new entry
$data[] = array(

AFTER, ADD
Code:
$forum_path = ( trim($forum_data[$j]['remote_url'] == '') ? append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id")) : $forum_data[$j]['remote_url'];

FIND
Code:
'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_data['forum_id'])

REPLACE WITH
Code:
'U_VIEWFORUM' => $forum_path)

I really don't know how the SEO MOD will handle this though, so make sure you have backups of all files that you modify before you overwrite them...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Need to change just hyperlink
PostPosted: 08/16/2007 2:22 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: 2:21 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
Thanks for the detailed description but I didn't understand the first step as how to add a new field in my phpbb_forums table and name it something like remote_url.

crybaby
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: Need to change just hyperlink
PostPosted: 08/16/2007 2:27 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 6:21 PM
Location: St Pete, FL
peace.gif
This would add a new field to the phpbb_forums table named remote_url that would accept up to 255 characters:

Code:
ALTER TABLE phpbb_forums ADD COLUMN remote_url varchar(255);

This and the code above would be easy to turn into a MOD that you could install 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: Need to change just hyperlink
PostPosted: 08/16/2007 4:44 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: 2:21 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
I ran the SQL query and it ran successfully  blob8

Now what is the meaning of Then I would enter the http://www.shair-o-shairi.com path next to the Shair-o-Shairi forum.

After this the changes in index.php file I will manage to do it as you have said to do Smile
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: Need to change just hyperlink
PostPosted: 08/16/2007 4:54 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 6:21 PM
Location: St Pete, FL
peace.gif
You could use this query to populate the new field:

Code:
UPDATE phpbb_forums SET remote_url='http://www.shair-o-shairi.com' WHERE forum_name='Shair-o-Shairi';

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: Need to change just hyperlink
PostPosted: 08/16/2007 5:56 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: 2:21 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
I did and it gave me

Code:
Parse error: syntax error, unexpected ')' in /home2/traders/public_html/funwadi/forum/index.php on line 1512


Than I backed up the codes which were original.

Anything we can do? By the way, it's not that much necessary If it is difficult to find the solution...
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: Need to change just hyperlink
PostPosted: 08/16/2007 6:45 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 6:21 PM
Location: St Pete, FL
peace.gif
I made at least 6 mistakes in the code I listed above.  Here is a MOD that will do the same as what we were trying to do, which you can install through EM:

Shairi_url_100.zip

This is what the MOD script looks like now:

Code:
#################################################################
## MOD Title: Shair-o-Shairi URL Link
## MOD Author: Nightrider < phpbb {a} 4fxearth.net > - http://4fxearth.net/phpBB2
## MOD Description: This makes it so that forums can be turned into direct links to other
##                   3rd party sources outside of phpBB...
## Mod Version: 1.0.0
##
## Installation Level: easy
## Installation Time: 1 Minute
##
## Files To Edit: 1
##                index.php
##
## Files to edit after being installed: none
##
## Included Files: 0
##
#################################################################
##
## Author's Note:
##
#################################################################
#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_forums ADD COLUMN remote_url varchar(255);
UPDATE phpbb_forums SET remote_url='http://www.shair-o-shairi.com' WHERE forum_name='Shair-o-Shairi';

#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('catrow.forumrow',   array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#
                     $forum_path = ( trim($forum_data[$j]['remote_url']) == '') ? append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") : $forum_data[$j]['remote_url'];                                                
#
#-----[ FIND ]------------------------------------------
#
'U_VIEWFORUM' =>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id")
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
$forum_path
#
#-----[ FIND ]------------------------------------------
#
// Append new entry
$data[] = array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#
      $forum_path = ( trim($forum_data['remote_url']) == '') ? append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_data['forum_id']) : $forum_data['remote_url'];                                                
#
#-----[ FIND ]------------------------------------------
#
'U_VIEWFORUM' =>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_data['forum_id'])
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
$forum_path
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Need to change just hyperlink
PostPosted: 08/16/2007 6:52 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: 2:21 AM
Location: UNITED ARAB EMIRATES
unitedACa.gif
oOps! 6 mistakes!

I have downloaded and will install now. Will let you know what happens next...
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: Need to change just hyperlink
PostPosted: 08/16/2007 7:02 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 6:21 PM
Location: St Pete, FL
peace.gif
Yep, believe it or not, I am human too and I just proved it.  Hopefully there won't be any mistakes in this copy of the MOD and hopefully once installed, it will actually work.  But with the SEO code, I really don't know what to expect here....

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
 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.0807s (PHP: 68% - SQL: 32%) - SQL queries: 58 - GZIP disabled - Debug on