Welcome to Fogfighters Hungary!
 
  Login or Register
.week  
Time
 
 
 
Languages
Select Interface Language:

 
Google Translation
Translation
 
Traffic Report
 
Where are you from?
 
Map Random
Objective
Hindenburg
View Hindenburg
The Axis HQ constructed a new decoder in the summer of 1944. It was tested in the base of Hindenburg II. blimp.* * The allied forces dropped in the nearby village with the command: 'Steal the decoder and escape with the
Hits: 4
Total Maps: 85
 
Modules
· Home
· About Easter
· Büntetés kalkulátor
· Bible
· Biorythm
· Birds
· Black Gallery
· Cats
· Coppermine
· Dogs
· eCards
· ET Game manual
· ET Handbuch
· ET játékleírás
· ET Maps
· Fórumok
· FIFA World Cup 2006
· Fish
· Google Guide
· Googlemaps
· Hírküldés
· Help Desk
· Internet_TV
· Keresés
· Letöltések
· Members List
· Member_Map
· News
· Online Radios
· PHP-Nuke_HOWTO
· PHP-Nuke_Tools
· Private Messages
· Punkbuster
· Saját beállításaid
· Shout Box
· Statisztikák
· Szavazások
· Szerencsejáték
· Tagfelvétel
· Viccek
· Videó kollekció
· Web címek
· Web Development
 
MS-Analysis
Top-Ten Countries visiting Fogfighters Hungary

1 United States United States
2 China China
3 Viet nam Viet nam
4 Russian Federation Russian Federation
5 France France
6 Hungary Hungary
7 Canada Canada
8 Ukraine Ukraine
9 United Kingdom United Kingdom
10 Netherlands Netherlands
11 Germany Germany
12 Poland Poland
13 Italy Italy
14 Taiwan, Province of China Taiwan, Province of China
15 Seychelles Seychelles
16 Romania Romania
17 Indonesia Indonesia
18 Sweden Sweden
19 Thailand Thailand
20 Brazil Brazil
21 Japan Japan
22 South Africa South Africa
23 Lithuania Lithuania
24 India India
25 Spain Spain
26 Luxembourg Luxembourg
27 Chile Chile
28 Turkey Turkey
29 Moldova, Republic of Moldova, Republic of
30 Korea, Republic of Korea, Republic of
31 Venezuela Venezuela
32 Malaysia Malaysia
33 unknown unknown
34 Australia Australia
35 Switzerland Switzerland
36 Singapore Singapore
37 Colombia Colombia
38 Hong Kong Hong Kong
39 Mexico Mexico
40 Argentina Argentina
41 Belize Belize
42 Greece Greece
43 Honduras Honduras
44 Estonia Estonia
45 Czech Republic Czech Republic
46 Latvia Latvia
47 Bangladesh Bangladesh
48 Bulgaria Bulgaria
49 Pakistan Pakistan
50 Albania Albania

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




August


 
Képes Naptár
There is a problem right now with this block.
 
CPG Random Picture

#JoJo#

 
Latest Videos


Last added videos

Orvosnál

Orvosnál

Last added videos

Funny

Funny Mortar

Last added videos

Shy

Shy Rose - I Cry For You
 
How to redirect Your Info to the Forums user profile

18.6.2. How to redirect Your Info to the Forums user profile

Figure 18-5. Your Info link in the User Preferences panel.

Your Info link in the User Preferences panel.



With the advent of phpBB forums in PHP-Nuke (starting from somewhere around v. 6.5), you not only have to cope with two administration panels, one for PHP-Nuke in general and one for the Forums in particular, your users can maintain their profile in two places too, from the Your Info link in the User Preference panel (Figure 18-5), as well as the Forums profile link in the Forums module (Figure 18-6).

Figure 18-6. Forum Profile link in the Forums module.

Forum Profile link in the Forums module.



The Your Info link has the URL

modules.php?name=Your_Account&op=edituser

and leads to a panel similar to the one of Figure 18-7.

Figure 18-7. User profile in Your Info.

User profile in Your Info.



The Profile link in the Forums module, on the other hand, has the URL

modules.php?name=Forums&file=profile&mode=editprofile

(optionally with the session ID parameter, sid, which is not shown here) and leads to the panel shown in Figure 18-8.

Both panels use the same database tables in the background, so it doesn't matter which one you use. This may be confortable for some, but also confusing for other users.

If your users find it confusing to use two different entry points for their personal information, you can modify the Your_Account module to redirect them to the Forum profile (Figure 18-8), even when they click on the Your Info link (Figure 18-5).

Figure 18-8. User profile in the Forums.

User profile in the Forums.



The Your Info link is output ("echoed") in modules/Your_Account/navbar.php, in the following code block:

echo "<font class=\"content\">"
    ."<center><a href=\"modules.php?name=Your_Account&amp;op=edituser\">
      <img src=\"$menuimg\" border=\"0\" alt=\""._CHANGEYOURINFO.
     "\" title=\""._CHANGEYOURINFO."\"></a><br>"
    ."<a href=\"modules.php?name=Your_Account&amp;op=edituser\">"
    ._CHANGEYOURINFO."</a>"
    ."</center></font></td>";

To redirect the users to the Forum profile (Figure 18-8), you can change the above block to:

echo "<font class=\"content\">"
    ."<center><a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=editprofile\">
      <img src=\"$menuimg\" border=\"0\" alt=\""._CHANGEYOURINFO.
     "\" title=\""._CHANGEYOURINFO."\"></a><br>"
    ."<a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=editprofile\">"
    ._CHANGEYOURINFO."</a>"
    ."</center></font></td>";

As you can easily see, we have changed only the two links (one for the image and one for the text), the other lines are for your reference only.

Note

It is not necessary to compute the user's numeric ID and pass it on the URL through the u parameter - the mode=editprofile parameter on the URL will find the user automatically (but mode=viewprofile will not!).

But wait a minute! Is this really all we have to change? Is the Your Info link (Figure 18-5) the only one that leads a user to the profile screen of the Your_Info module (Figure 18-7)? How about the user name links in other modules, for example? Search for the string "op=edituser" and you will already find a ton of those links in various places (Newsletter, language files, Reviews...) And how about a new user? Will the new user registration screen be the one of Your_Account or the one of Forums?

Instead of chasing links in the code, there is a more elegant solution that will eliminate any attempt to bring a user to the Your Info profile at its very beginning! It is also a very good example of what type of control you can achieve over your PHP-Nuke, if you put your knowledge about the way a module works (see Chapter 21) into practice:

In modules/Your_Account/index.php find the lines:

case "edituser":
edituser();
break;

and replace them with:

case "edituser":
Header("Refresh: 0; url=modules.php?name=Forums&file=profile&mode=editprofile");
break;

This will take care of the "edit user" case. We need to do the same for the "new user" case too. Just replace

case "new_user":
new_user();
break;

with:

case "new_user":
Header("Refresh: 0; url=modules.php?name=Forums&file=profile&mode=register");
break;

The idea here is the following: instead of searching all code of all modules for links that point to the Your Info profile, we look at the parameters that such a link passes on the URL. A typical Your Info profile link is of the form:

modules.php?name=Your_Account&op=edituser

so the parameters it passes to the modules.php script are:

  • name: the name of the module to execute (Your_Account)

  • op: the operation to execute (edituser)

The second URL parameter, op, is checked at one single place in the code, in the switch statement of modules/Your_Account/index.php:

switch($op) {
    case "logout":
        logout();
        break;
    ...many other cases checked here, among them "edituser" and "new_user"
    
    default:
        main($user);
        break;
}

This is the one and only point of control for the actions taken by the Your_Account module. We make use of this fact and change the actions that are to be taken for the operations "edituser" and "new_user". We don't change the links, we change the actions that follow when the links are clicked.

This will make the Your Info profile practically inaccessible in your system and will present the Forums profile instead.

Warning Missing functionality in the Forums profile!
 

Bear in mind that, depending on the versions of PHP-Nuke and Forums, you may be missing some functionality in the Forums profile, that was present in the profile that was accessible through the Your Info link. This may include changing the fake email address, changing the subscription to the newsletter, or changing the extra info (Figure 12-1). However, this is planned to be corrected in the future.


Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO

Send all questions and comments to:
Webmaster
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest Fogfighters Hungary © 2007 - 2022

You can syndicate our news using the file backend.php or ultramode.txt

PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.21 Seconds

:: subBlack phpbb2 style by spectre :: PHP-Nuke theme by www.nukemods.com ::