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
Lighthouse
View Lighthouse
The Allies have constructed an English Channel Defence Command Centre just off the South Coast of England.Axis are attempting to disable it.
Hits: 1
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 Australia Australia
19 Thailand Thailand
20 Sweden Sweden
21 Brazil Brazil
22 India India
23 Japan Japan
24 South Africa South Africa
25 Lithuania Lithuania
26 Argentina Argentina
27 Spain Spain
28 Chile Chile
29 Luxembourg Luxembourg
30 Turkey Turkey
31 Moldova, Republic of Moldova, Republic of
32 Korea, Republic of Korea, Republic of
33 Venezuela Venezuela
34 Malaysia Malaysia
35 unknown unknown
36 Switzerland Switzerland
37 Singapore Singapore
38 Colombia Colombia
39 Hong Kong Hong Kong
40 Mexico Mexico
41 Belize Belize
42 Greece Greece
43 Honduras Honduras
44 Estonia Estonia
45 Mongolia Mongolia
46 Czech Republic Czech Republic
47 Latvia Latvia
48 Bangladesh Bangladesh
49 Bulgaria Bulgaria
50 Pakistan Pakistan

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




International Music Day





International Day of Older Persons


 
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 bypass article approval

18.8.1. How to bypass article approval

The standard workflow for a news article is that the user writes it, submits it for approval by the administrator, the administrator reads it, approves and publishes it on the site. This has some advantages:

  • Everybody can post, even anonymous users.

  • Since the posts are checked, there is no risk of getting flooded with garbage posts.

But it also has some disadvantages too:

  • Users have to wait to see their post published. This may not be what they expect, if actuality of content is highly important for the topics of your site.

  • The administrators have to spend time on approving news articles. Waiting content (Figure 18-11) can be quite an administrative headache, if the site receives many user submissions a day (see, for example phpnuke.org, where there are dozens of submissions awaiting approval at any given time).

Figure 18-11. Waiting Content block.

Waiting Content block.



Fortunately, to bypass article approval, the solution is relatively simple (see Automatic Article Posting):

  • For versions before PHP-Nuke 6.5:

    In the modules/Submit_News, in the function submitStory(), find this

    $result = sql_query("insert into ".$prefix."_queue 
    values (NULL, '$uid', '$name', '$subject', '$story', 
    '$storyext', now(), '$topic', '$catid', '$alanguage')", $dbi);
    

    Change it to this:

    $result = sql_query("insert into ".$prefix."_stories 
    values (NULL, '$catid', '$name', '$subject', now(), '$story', 
    '$storyext', '0', '0', '$topic', '$name', ", '0', '$alanguage', 
    '0','0', '0', '0', '0')", $dbi); 
    

    The story will get posted immediately, so you will want to make the Submit_News module only available to Users. Also, you will notice that it will now say "Posted By Some_user", and it will no longer show in italics.

  • For PHP-Nuke 6.5 and later, the solution is slightly different. Replace this:

    $sql = "INSERT INTO ".$prefix."_queue VALUES (NULL, '$uid', '$name', '$subject',
    '$story', '$storyext', now(), '$topic', '$alanguage')";
    

    with this:

    $sql = "insert into ".$prefix."_stories values (NULL, '$catid', '$name', '$subject',
    now(), '$story', '$storyext', '0', '0', '$topic', '$name', ", '0', '$alanguage', '0', '0', '0', '0','0', ")";
    

You will also want to change the language file "defines", or edit these lines in the function submitStory (this is what is displayed when the submission is sent.

echo "<center><font class=\"title\">"._SUBSENT."</font><br><br>"
."<font class=\"content\"><b>"._THANKSSUB."</b><br><br>"
.""._SUBTEXT.""
."<br>"._WEHAVESUB." $waiting "._WAITING."";

18.8.1.1. The formatAidHeader() function

If you want to make the "Posted By Some_user" also be a link to the User's profile, then you can edit the function formatAidHeader in your mainfile.php. The following refers to PHP-Nuke 6.5 and above.

The function is simple: it takes an argument, the author id $aid, searches the nuke_authors table for that author id and, if found, it prints a link to the web page of the author. Only if the web page link fiels of nuke_authors is empty for that author, it prints a link to the author's e-mail (which is always there):

function formatAidHeader($aid) {
    global $prefix, $db;
    $sql = "SELECT url, email FROM ".$prefix."_authors WHERE aid='$aid'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $url = $row[url];
    $email = $row[email];
    if (isset($url)) {
        $aid = "<a href=\"$url\">$aid</a>";
    } elseif (isset($email)) {
        $aid = "<a href=\"mailto:$email\">$aid</a>";
    } else {
        $aid = $aid;
    }
    echo "$aid";
}

You could easily change this behaviour. For example, you could take out the check against the $url and leave only the e-mail part, if you wanted the "Posted By Some_user" to be an e-mail link, rather than a link to a web page (see Change Posted by... Name (Website) to Name (Email)):

function formatAidHeader($aid) {
    global $prefix, $db;
    $sql = "SELECT url, email FROM ".$prefix."_authors WHERE aid='$aid'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $url = $row[url];
    $email = $row[email];
     if (isset($email)) {
        $aid = "<a href=\"mailto:$email\">$aid</a>";
    } else {
        $aid = $aid;
    }
    echo "$aid";
}

You could make it even more sophisticated, by making "Posted By Some_user" a link to the user's profile (see Section 18.6.2 for the related subject of user profile redirection). The formatAidHeader function should then be:

function formatAidHeader($aid) { 
    global $prefix, $db;
    $sql = "SELECT url, email FROM ".$prefix."_authors WHERE aid='$aid'";
    $result = $db->sql_query($sql);
    if($row = $db->sql_fetchrow($result)) {
        $url = $row[url]; 
        $email = $row[email]; 
        if (isset($url)) { 
            $aid = "<a href=\"$url\">$aid</a>";
        } elseif (isset($email)) {  
            $aid = "<a href=\"mailto:$email\">$aid</a>"; 
        } else {
            $aid = $aid;
        } 
   }else {
        $sql = "SELECT user_id FROM ".$prefix."_users WHERE username='$aid'"; 
        $result = $db->sql_query($sql); 
        $row = $db->sql_fetchrow($result);
        $user_id = $row[user_id];
        $aid = "<a
        href=\"modules.php?name=Forums&file=profile
&mode=viewprofile&u=$user_id\">$aid</a>";
    }
    echo "$aid"; 
}

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

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