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
Fun_beach_final
View Fun_beach_final
The main assault on FUN Beach has started! Allies have to breach the ventilation system in order to infiltrate a base where the latest wurzburg radar prototype lies...
Hits: 3
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 unknown unknown
8 Ukraine Ukraine
9 Canada Canada
10 United Kingdom United Kingdom
11 Germany Germany
12 Netherlands Netherlands
13 Poland Poland
14 Italy Italy
15 Taiwan, Province of China Taiwan, Province of China
16 Seychelles Seychelles
17 Australia Australia
18 Romania Romania
19 Indonesia Indonesia
20 India India
21 Thailand Thailand
22 Sweden Sweden
23 Brazil Brazil
24 Japan Japan
25 South Africa South Africa
26 Lithuania Lithuania
27 Argentina Argentina
28 Spain Spain
29 Iran, Islamic Republic of Iran, Islamic Republic of
30 Chile Chile
31 Luxembourg Luxembourg
32 Turkey Turkey
33 Moldova, Republic of Moldova, Republic of
34 Korea, Republic of Korea, Republic of
35 Belarus Belarus
36 Malaysia Malaysia
37 Venezuela Venezuela
38 Switzerland Switzerland
39 Singapore Singapore
40 Colombia Colombia
41 Hong Kong Hong Kong
42 Mexico Mexico
43 Mongolia Mongolia
44 Czech Republic Czech Republic
45 Belize Belize
46 Greece Greece
47 Honduras Honduras
48 Estonia Estonia
49 Latvia Latvia
50 Bulgaria Bulgaria

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




Reggae Music Day


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

Kilátás az erkélyről 2.

 
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 allow anonymous web link submissions

26.6. How to allow anonymous web link submissions

Figure 26-5. Administration panel: Web Links.

Administration panel: Web Links.



Suppose you need to allow anonymous users to submit web links that then must be approved by an Administrator. Is this possible with the vanilla install of PHP-Nule?

It turns out that yes, it is - very easily indeed! But instead of just presenting you the solution, we will also describe how we arrived at it (see Anonymous Web Link Submissions):

We first thought that if the Web Links module was visible by all visitors, it would also allow them to suggest a link. We tried it, but we got the error:

You are not a registered user or you have not logged in.

If you were registered you could add links on this website.

Becoming a registered user is a quick and easy process.

Why do we require registration for access to certain features?

So we can offer you only the highest quality content,

each item is individually reviewed and approved by our staff.

We hope to offer you only valuable information.

Obviously, PHP-Nuke made a check if this was a registered user - and issued that statement. But where was this check located in the code?

To find it, we used the same bottom-up approach of Section 3.9.6 and Section 26.5:

We first had to find the place where the above error was echoed. We thus searched the whole code tree for all occurences of a word that most probably would appear only in the error above - we chose the word "valuable". It turned out that the word "valuable" was in some unrelated text consntants - but it was also in the _LINKSNOTUSER7 text constant that was translated in all modules/Web_Links/language/lang-XXXX.php files!

Armed with this information, we only had to do a second search, this time for all occurences of the string "_LINKSNOTUSER" in the whole code tree of PHP-Nuke. We got again dozens of language files in the output, but we also got the modules/Web_Links/index.php file. Indeed, if at all, it must be this file where the check is made!

We thus checked the relevant lines of modules/Web_Links/index.php and the code went like this:

if (is_user($user) || $links_anonaddlinklock == 1) {
--> do the work here <--
}else {
    echo "<center>"._LINKSNOTUSER1."<br>"
        .""._LINKSNOTUSER2."<br><br>"
        .""._LINKSNOTUSER3."<br>"
        .""._LINKSNOTUSER4."<br>"
        .""._LINKSNOTUSER5."<br>"
        .""._LINKSNOTUSER6."<br>"
        .""._LINKSNOTUSER7."<br><br>"
        .""._LINKSNOTUSER8."";
}

So that's where the check is made! You can see it for yourself, because the code is almost speaking natural language:

If is user or anon add link

We first thought we had to remove the check "if is user", but then we saw that "or $links_anonaddlinklock == 1" which made us suspicious. So there was some kind of configuration variable ( $links_anonaddlinklock) which can control the outcome of the test!

We know from experience that such variables are set in a separate PHP file, in the same folder of the module. If you didn't have this experience, then you would just have to do a third search for all occurences of the string "links_anonaddlinklock" in the text of all files - there shouldn't be that many.

Indeed, $links_anonaddlinklock is set in modules/Web_Links/l_config.php:

# $links_anonaddlinklock:       Lock Unregistered users from Suggesting New Links? 
                                (0=Yes 1=No)
...many other comments
######################################################################
...many other variables
$links_anonaddlinklock = 0;

So you just have to set

$links_anonaddlinklock = 1;

in modules/Web_Links/l_config.php and any user, also unregistered ones, will be able to suggest Web Links!

Tip A general approach to problem solving
 

You can use this bottom-up approach to solve many similar problems of your daily work as an administrator of a PHP-Nuke system.


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.22 Seconds

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