How to take controll of PM Profile and Email links

Discussion forum for MOD Writers regarding MOD Development.
CancunManny
Registered User
Posts: 51
Joined: Mon Jan 25, 2010 7:32 pm

How to take controll of PM Profile and Email links

Postby CancunManny » Mon Jan 25, 2010 7:51 pm

Hello everyone, new to this board, and new to phpbb. Hope I can find some guidance from you all.

I am running dolphin 6.1.6 by boonex. I am integrating PHPBB2 with this forum, since the forum software included in dolphin is not very good. I won't be using many of the features of PHPBB2 such as profiles, pms, etc, as these will run via the dolphin software.

I think I would have the same problem in PHPBB3, hence would be the same, or very similar solution.

This is part of the code I want/need to modify in viewtopic.php:

Code: Select all

      $temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
      $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
      $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';

      $temp_url = 'CancunWithMe.com';
      $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
      $pm = '<a href=$temp_url></a>';


The profile part of the code is untouched. As you can see on the PM part of the code I tried to "highjack" the $temp_url variable, and put CancunWithMe.com just as an example. I looked up the append_sid function, and not 100% sure what it is doing (I am a novice programmer), but figured that by reassigning the value of the variable it doesn't matter what append_sid does.

The result I was hopping to get was for the PM link to point to CancunWithMe.com, however the link I get is the following: cancunwithme.com/forum/CancunWithMe.com

Seems phpbb is adding the root path to any link I want to use. Can anyone guide me on how to take full control of the href info, so that I can link outside the root? In fact, if someone wants to be kind enough and help me out ALL THE WAY, this is the actual final link I a looking for

Code: Select all

cancunwithme.com/compose.php?ID=user_ID


The user id would be the user ID of the poster. The user IDs are the same on dolphin and phpbb database.

Thanks for any and all help you all can provide to me.

Manny
Last edited by CancunManny on Mon Jan 25, 2010 8:15 pm, edited 1 time in total.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 48641
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: How to take controll of PM Profile and Email links

Postby Brf » Mon Jan 25, 2010 7:59 pm

phpBB2 is no longer in support, so we cannot suggest any code changes.
All we can do with phpBB2 is help you convert to phpBB3.

CancunManny
Registered User
Posts: 51
Joined: Mon Jan 25, 2010 7:32 pm

Re: How to take controll of PM Profile and Email links

Postby CancunManny » Mon Jan 25, 2010 8:14 pm

Thank you for approving my post. I do understand that there is no longer support for phpbb2, and that code changes specifically for phpbb2 are no longer supported. However, I think this would be the same issue in PHPBB3.

Could someone help me verify this please? If I wanted to change in PHPBB3 http://www.cancunwithme.com/forum/ucp.p ... p=11845135 (The PM link under the posters icon on a post) to www.cancunwithme.com/compose.php?ID=user_ID (with the user ID being the same as in the forum)

Thanks again

User avatar
Brf
Support Team Member
Support Team Member
Posts: 48641
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: How to take controll of PM Profile and Email links

Postby Brf » Mon Jan 25, 2010 8:18 pm

phpBB3 does not have that code.

CancunManny
Registered User
Posts: 51
Joined: Mon Jan 25, 2010 7:32 pm

Re: How to take controll of PM Profile and Email links

Postby CancunManny » Mon Jan 25, 2010 8:37 pm

I understand that, just wondering what the code on PHPBB3 would look like. I will be updating to PHPBB3 as soon as a stable dolphin 7 with phpbb3 integration comes out. It is almost there. Soon I will need to know how I would make these changes in PHPBB3.

I know I will run phpbb3 inside an iframe, and that PHPBB3 will be running its root at cancunwithme.com/forum. I will need to override the pm/email/profile links in PHPBB3 to point to those in dolphin.

I am afraid I will run into the same problem. That I will find the equivalent of viewtopic.php(phpbb2) in PHPBB3, and that what ever modifications i try to do to the code that forms the href, will lead me to the same problem, I will get the desired output, but with "cancunwithme.com/fourm/" attached prior to it.

I know I will need the solution for PHPBB3 eventually, and I am hoping that the solution in for PHPBB3 will give me some insight as to how to solve the same problem I have now in PHPBB2.

thanks again

User avatar
Brf
Support Team Member
Support Team Member
Posts: 48641
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: How to take controll of PM Profile and Email links

Postby Brf » Mon Jan 25, 2010 8:45 pm

Once you get phpBB3, then we can discuss any changes.
phpBB3 handles its profile data in a completely different way than phpBB2 did.

CancunManny
Registered User
Posts: 51
Joined: Mon Jan 25, 2010 7:32 pm

Re: How to take controll of PM Profile and Email links

Postby CancunManny » Tue Jan 26, 2010 5:06 am

Thank you Brf. I have taken your advice and installed, and imported into phpbb, as can be seen in www.cancunwithme.com/Cancun_Forum

You guys seem to offer great support here, and might even be able to come up with a stable integration between dolphin 6.1.6 and PHPBB3. Instead of posting one new topic with ALL the necessary code, I will break it down to one post per function. This one each one can be tested and modified independently.

In exchange for all the great help, once completed I would provide ALL the code and instructions, for those like me that want to integrate phpbb3 with dolphin 6.1.6. Eventually I will upgrade to dolphin 7, at which point I would update instructions.

Looking forward to being a regular poster here, since I love to share what I learn, and seems Dolphin is not much represented in this forum yet.

Brf, if you rather me only do one post, please delete my posts, and let me know. I would gladly put them all in one post if you prefer that

User avatar
Brf
Support Team Member
Support Team Member
Posts: 48641
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: How to take controll of PM Profile and Email links

Postby Brf » Tue Jan 26, 2010 12:09 pm

Cool.

append_sid() insures that the session info is stored in the cookie, or the &sid= is attached to the URL as a parameter. If you are using a different PM system, you should be able to put your own URL in there. I do not know whether Dolphin is using its own session info, or using the phpBB one. In either case, it should be important that the session info is retained.


Return to “[3.0.x] MOD Writers Discussion”

Who is online

Users browsing this forum: AmigoJack and 24 guests