 | Need to change just hyperlink |  |
Posted: 08/15/2007 4:47 PM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 2:21 AM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
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.
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Need to change just hyperlink |  |
Posted: 08/15/2007 10:34 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 6:21 PM
Location: St Pete, FL
|

|
|
|
|
 |
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...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Need to change just hyperlink |  |
Posted: 08/16/2007 2:22 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 2:21 AM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
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.
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Need to change just hyperlink |  |
Posted: 08/16/2007 2:27 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 6:21 PM
Location: St Pete, FL
|

|
|
|
|
 |
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...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Need to change just hyperlink |  |
Posted: 08/16/2007 4:44 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 2:21 AM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
I ran the SQL query and it ran successfully
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  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Need to change just hyperlink |  |
Posted: 08/16/2007 4:54 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 6:21 PM
Location: St Pete, FL
|

|
|
|
|
 |
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';
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Need to change just hyperlink |  |
Posted: 08/16/2007 5:56 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 2:21 AM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
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 |
|
|
 | Re: Need to change just hyperlink |  |
Posted: 08/16/2007 6:45 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 6:21 PM
Location: St Pete, FL
|

|
|
|
|
 |
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
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Need to change just hyperlink |  |
Posted: 08/16/2007 6:52 AM |
|
|
|
|
|
| Citation |
| Posts |
1017 |
| Word Cnt. |
64,643 |
| BDay |
Apr 18 |
| Sign |
Aries |
| Sex |
 |
|
|
|
Joined: Apr 01, 2007
Local time: 2:21 AM
Location: UNITED ARAB EMIRATES
|

|
|
|
|
 |
oOps! 6 mistakes!
I have downloaded and will install now. Will let you know what happens next... |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Need to change just hyperlink |  |
Posted: 08/16/2007 7:02 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 6:21 PM
Location: St Pete, FL
|

|
|
|
|
 |
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....
 |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|