Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes
Author Message
BobMarion
Former Admin in Good Standing


Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)

PostPosted: Sun Sep 05, 2004 12:28 pm Reply with quote

10 to 1 odds GT is is seeing the word PROFILE and trying to GT it which is why that word is the root of the issue Smile Try removing the section of GT that controls profile linking and see if it clears it up Wink

_________________
Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1159
Location: Sanbornton, NH USA

PostPosted: Mon Sep 06, 2004 12:44 am Reply with quote

I'm not sure about that Bob... I've NEVER had GT running on my site and I had the same problem until I made the adjustment displayed earlier in this post.

You don't suppose it has anything to do with this?

Code:
   else if ((ereg("profile", $url)) && (!ereg("highlight=profile", $url)))

   {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace("profile.php", "forums.html?file=profile", $url); //  and put it back for the modules.php
       $dummy = 1;


from the includes/sessions.php

_________________
Steph Benoit Only registered users can see links on this board! Get registered or login!
1CMS, 100% Section 508 and W3C XHTML/CSS Compliant (Truly) 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Mon Sep 06, 2004 8:32 am Reply with quote

That's the problem code. Good catch! Now we just need to fix it.
 
View user's profile Send private message
chatserv
Member Emeritus


Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Mon Sep 06, 2004 9:55 am Reply with quote

Try changing:
Code:
else if ((ereg("profile", $url)) && (!ereg("highlight=profile", $url)))

to:
Code:
else if ((ereg("profile", $url)) && (!ereg("highlight", $url) && !ereg("profile", $url)))
 
View user's profile Send private message Visit poster's website
Raven
PostPosted: Mon Sep 06, 2004 11:13 am Reply with quote

worship That appears to fix it. Thanks so much CS!
 
Raven
PostPosted: Mon Sep 06, 2004 12:08 pm Reply with quote

privmsg and memberprofile have the same problem and will have to be changed accordingly. Here are the lines as they should be
Code:
//   else if ((ereg("privmsg", $url)) && (!ereg("highlight=privmsg", $url)))

   else if ((ereg("privmsg", $url)) && (!ereg("highlight", $url) && !ereg("privmsg", $url)))
   {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace("privmsg.php", "modules.php?name=Private_Messages&file=index", $url); //  and put it back for the modules.php
   }
//   else if ((ereg("profile", $url)) && (!ereg("highlight=profile", $url)))
   else if ((ereg("profile", $url)) && (!ereg("highlight", $url) && !ereg("profile", $url)))
   {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace("profile.php", "forums.html?file=profile", $url); //  and put it back for the modules.php
       $dummy = 1;
   }
//   else if ((ereg("memberlist", $url)) && (!ereg("highlight=memberlist", $url)))
   else if ((ereg("memberlist", $url)) && (!ereg("highlight", $url) && !ereg("memberlist", $url)))


Please note that it appears if you are using GT then there is still more work to be done or Private Messages will not work with the above changes Mad
 
64bitguy
PostPosted: Mon Sep 06, 2004 1:34 pm Reply with quote

As I glare into my crystal ball, I see a "Patched 2.6" in the near future!

Smile

Do you need the (modules.php?name=) part in the first $url = str_replace section? and if so, why not in the second "forums" part? The format kind of lost me there.
 
64bitguy
PostPosted: Thu Sep 09, 2004 10:55 pm Reply with quote

Raven, did you get this working yet?

If so, can I get a copy of the good code?

Thanks!
 
Raven
PostPosted: Thu Sep 09, 2004 10:57 pm Reply with quote

You mean the GT part? I haven't had time to explore that. But if you are not using GT then that code above works, afaik.
 
64bitguy
PostPosted: Thu Sep 09, 2004 11:03 pm Reply with quote

I'm using 0.4a now Bang Head

Do you think the private messages problem is related to this section of code using the modules.php?name?

Code:
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &

           $url = str_replace("privmsg.php", "modules.php?name=Private_Messages&file=index", $url); //  and put it back for the modules.php
 
64bitguy
PostPosted: Fri Oct 15, 2004 4:17 pm Reply with quote

I hate to say it, but this problem is back again.

I seached for the exact phrase "redirect after login" any results take me to a 404 page.

Just experienced the same thing on Only registered users can see links on this board! Get registered or login!

Gosh, my luck searching for things just stinks... Mr. Green
 
chatserv
PostPosted: Fri Oct 15, 2004 5:08 pm Reply with quote

Simple fix.
Open sessions.php and find:
Code:
else if (ereg("redirect", $url))

change to:
Code:
else if ((ereg("redirect", $url)) && (!ereg("highlight=redirect", $url)))
 
64bitguy
PostPosted: Fri Oct 15, 2004 5:21 pm Reply with quote

Thanks Chatserv!

I had already changed that on my copy of 7.4 which is probably why my site wasn't affected.

Next question is if the Private Messages issue has been fixed (described by Raven above).

Again, thanks!
 
chatserv
PostPosted: Fri Oct 15, 2004 5:54 pm Reply with quote

64bitguy wrote:
Next question is if the Private Messages issue has been fixed (described by Raven above).

Not sure about the one you mean, care to describe it again?
 
64bitguy
PostPosted: Fri Oct 15, 2004 6:34 pm Reply with quote

Raven wrote:
privmsg and memberprofile have the same problem and will have to be changed accordingly. Here are the lines as they should be
Code:
//   else if ((ereg("privmsg", $url)) && (!ereg("highlight=privmsg", $url)))

   else if ((ereg("privmsg", $url)) && (!ereg("highlight", $url) && !ereg("privmsg", $url)))
   {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace("privmsg.php", "modules.php?name=Private_Messages&file=index", $url); //  and put it back for the modules.php
   }
//   else if ((ereg("profile", $url)) && (!ereg("highlight=profile", $url)))
   else if ((ereg("profile", $url)) && (!ereg("highlight", $url) && !ereg("profile", $url)))
   {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace("profile.php", "forums.html?file=profile", $url); //  and put it back for the modules.php
       $dummy = 1;
   }
//   else if ((ereg("memberlist", $url)) && (!ereg("highlight=memberlist", $url)))
   else if ((ereg("memberlist", $url)) && (!ereg("highlight", $url) && !ereg("memberlist", $url)))


Please note that it appears if you are using GT then there is still more work to be done or Private Messages will not work with the above changes Mad
 
chatserv
PostPosted: Fri Oct 15, 2004 6:43 pm Reply with quote

This is my append_sid function:
Code:
function append_sid($url, $non_html_amp = false)

{
   global $SID, $admin, $userdata;
   if (ereg("admin=1", $url) || ereg("admin_", $url) || ereg("pane=", $url)){
                        //  The format is fine, don't change a thing.
   } else if (ereg("Your_Account", $url)){
           $url = str_replace(".php", "", $url);       //  Strip the .php from all the files,
           $url = str_replace("modules", "modules.php", $url); //  and put it back for the modules.php
   }
   else if ((ereg("redirect", $url)) && (!ereg("highlight=redirect", $url)))
   {
           $url = str_replace("login.php", "modules.php?name=Your_Account", $url);       //  Strip the .php from all the files,
           $url = str_replace(".php", "", $url);       //  Strip the .php from all the files,
           $url = str_replace("?redirect", "&redirect", $url);       //  Strip the .php from all the files,
           $url = str_replace("modules", "modules.php", $url); //  and put it back for the modules.php
   }
   else if (ereg("menu=1", $url))
   {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace(".php", "", $url);       //  Strip the .php from all the files,
       $url = "../../../modules.php?name=Forums&file=$url";
   }
   else if ((ereg("privmsg", $url)) && (!ereg("highlight=privmsg", $url)))
   {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace("privmsg.php", "modules.php?name=Private_Messages&file=index", $url); //  and put it back for the modules.php
   }
   else if ((ereg("profile", $url)) && (!ereg("highlight", $url) && !ereg("profile", $url)))
   {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace("profile.php", "modules.php?name=Forums&file=profile", $url); //  and put it back for the modules.php
       $dummy = 1;
   }
   else if ((ereg("memberlist", $url)) && (!ereg("highlight=memberlist", $url)))
   {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace("memberlist.php", "modules.php?name=Members_List&file=index", $url); //  and put it back for the modules.php
   } else {
           $url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
           $url = str_replace(".php", "", $url);
           $url = "modules.php?name=Forums&file=".$url; //Change to Nuke format
   }

   if ($userdata['user_level'] > 1) {
   if ( !empty($SID) && !eregi('sid=', $url) )
   {
       if ( !empty($SID) && !eregi('sid=', $url) )   {
      $url .= ( ( strpos($url, '?') != false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
          }
      }   
   }
   return($url);
}

Private messages seem ok at the site
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©