26 (edited by Rolex 2013-04-22 19:09)

Re: Move important post topics only to News page

^^^ I cannot make it. If you can help or anybody else can, it will be appreciated. I think this is not a hard one.

And also, the correction of the argument below.

Warning: Missing argument 2 for generate_avatar_markup(), called in /home/nairala2/public_html/forum/misc.php(813) : eval()'d code on line 507 and defined in /home/nairala2/public_html/forum/include/functions.php on line 500 Warning: Missing argument 3 for generate_avatar_markup(), called in /home/nairala2/public_html/forum/misc.php(813) : eval()'d code on line 507 and defined in /home/nairala2/public_html/forum/include/functions.php on line 500 Warning: Missing argument 4 for generate_avatar_markup(), called in /home/nairala2/public_html/forum/misc.php(813) : eval()'d code on line 507 and defined in /home/nairala2/public_html/forum/include/functions.php on line 500

27 (edited by Rolex 2013-05-04 01:47)

Re: Move important post topics only to News page

@Trace, @Kushi, @dimkalinux, I've actually come to let you understand what the pun_forum_news extension should be like. Or if you think my request is different from the pun_forum_news, at least, punBB team can release this extension.

The links below are examples of what pun_forum_news extension should be like, or can be added to the current pun_forum_news extension as option to only send topics as news.

The first link was snipped from a vBulletin forum.

http://nairalanders.com/news1.png
http://nairalanders.com/news2.png
http://nairalanders.com/news3.png

28

Re: Move important post topics only to News page

I don't understand why it should look like that. But I said for you how you can simply do that. Just post choosen URLs into a custom page.

29 (edited by Rolex 2013-05-04 11:33)

Re: Move important post topics only to News page

@Trace, If I could make this, I wouldn't be here asking. If you cannot help out with this, let me know. I'm not saying it should look like the samples I posted.

Is it possible to help make it that way? and attach it somewhere for me so I can download and Install it.

I really wish I could do this myself as I have really waited for long to achieve this. Also, I don't mind donating $100 in achieving this course.

Thank you,

30

Re: Move important post topics only to News page

Download: https://docs.google.com/file/d/0B8nb9L3 … sp=sharing
And upload it to your forum root. You can also add a link to the menu:
Administration -> Settings -> Setup -> At the bottom "Add your own links to the main navigation menu" ->

1 = <a href="../latest_news.php">News</a>

You can change links in downloaded file (latest_news.php).
Just find:

                <li><a href="http://testing.com">Test news</a></li>
                <li><a href="http://testing.com">Test second news</a></li>
                <li><a href="http://testing.com">Test next news</a></li>
                <li><a href="http://testing.com">And next...</a></li>
                <li><a href="http://testing.com">And another one...</a></li>

And replace the content after "href="" (in example it is http://testing.com) with your own link.
"Test news" and other are titles for links. You can also change them.

31

Re: Move important post topics only to News page

@Trace, thank you very much. I really appreciate your help.

Just one more question, will I have to go through the FTP to add more links or is there anyway I can mark as latest news through forum to save me the stress, because it will be on a daily and hours interval of adding links as latest news.

Thank you,

32

Re: Move important post topics only to News page

Currently, you must add them manually. But I will try edit this script to do what it should do. smile

33

Re: Move important post topics only to News page

@Trace, thanks brother for your understanding. I will be waiting for the update.

Thanks again

34 (edited by Rolex 2013-05-04 14:33)

Re: Move important post topics only to News page

Only Administrators can view this page. It should allow both guess and members. Please check and post what to correct in it.

Also, it doesn't allow some characters in link title. If added the links would not display. Characters like, "(: ' -)" e.t.c. Please kindly check that as well.

Thanks

35

Re: Move important post topics only to News page

Find and remove:

if ($forum_user['g_read_board'] == '0' || $forum_user['is_guest'] || ($forum_user['g_id'] != '1' && $forum_user['g_id'] != '4'))
    message($lang_common['No view']);

Links should work. Please, give me a URL that doesn't work for you.

36 (edited by Rolex 2013-05-04 15:09)

Re: Move important post topics only to News page

<li><a href="http://nairalanders.com/forum/topic/322/what-men-really-want-10-things-you-think-impress-him-but-dont/">What Men Really Want: 10 Things You Think Impress Him, But Don’t</a></li>
                <li><a href="http://nairalanders.com/forum/topic/321/private-jet-efcc-probes-amaechi-over-missing-10m/">Private jet: EFCC probes Amaechi over missing $10m</a></li>
                <li><a href="http://nairalanders.com/forum/topic/320/tragic-lagos-polytechnic-student-raped-to-death-3-days-after-graduation/">Tragic: Lagos polytechnic student raped to death 3 days after graduation</a></li>

Above are links if added, will make it not display because of the colon ":" in the link title.

37

Re: Move important post topics only to News page

I've tested this and EVERYTHING works fine. All links are redirecting to your forum.
My latest_news.php file looks so:

<?php
/**
 * Displays custom page with news as links
 *
 * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
 * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
 * @package PunBB
 */
 
if (!defined('FORUM_ROOT'))
    define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';
  
define('FORUM_ALLOW_INDEX', 1);
define('FORUM_PAGE', 'Latest News');
 
// Setup breadcrumbs
$forum_page['crumbs'] = array(
    array($forum_config['o_board_title'], forum_link($forum_url['index'])),
    ucfirst(FORUM_PAGE)
);
 
require FORUM_ROOT.'header.php';
 
// START SUBST - <!-- forum_main -->
ob_start();
 
?>    <div class="main-head" style="margin-top: 1em">
        <h2 class="hn"><span>Latest news</span></h2>
    </div>
    <div class="main-content main-message">
        <p>
            <ol>
                <li><a href="http://nairalanders.com/forum/topic/322/what-men-really-want-10-things-you-think-impress-him-but-dont/">What Men Really Want: 10 Things You Think Impress Him, But Don’t</a></li>
                <li><a href="http://nairalanders.com/forum/topic/321/private-jet-efcc-probes-amaechi-over-missing-10m/">Private jet: EFCC probes Amaechi over missing $10m</a></li>
                <li><a href="http://nairalanders.com/forum/topic/320/tragic-lagos-polytechnic-student-raped-to-death-3-days-after-graduation/">Tragic: Lagos polytechnic student raped to death 3 days after graduation</a></li>

            </ol>
        </p>
    </div>
<?php
 
$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
 
ob_end_clean();
// END SUBST - <!-- forum_main -->
 
require FORUM_ROOT.'footer.php';

38 (edited by Rolex 2013-05-04 16:37)

Re: Move important post topics only to News page

It still doesn't work. To make you understand, see below links.

Doesn't work: http://nairalanders.com/forum/latest_ne … 20Copy.php

Works: http://nairalanders.com/forum/latest_ne … 20Copy.php

The second link displayed properly because I've removed the colons ":" in the links titles and also the apostrophe in the last word of the first link title that should have been "Don't"

You can also view my original link here: http://nairalanders.com/forum/latest_news.php

None of the links titles comprise Colon (:) Apostrophe (') and Dash (-)

Dash (-) can be used but it must not be spaced, which it shouldn't be that way.

39

Re: Move important post topics only to News page

So see my screen:
http://s13.postimg.org/3qcotza6f/Screeny.png

40

Re: Move important post topics only to News page

Okay. Can it be because of the punBB version?

41

Re: Move important post topics only to News page

I don't think so, rather it is caused by web server, but upgrading to the latest version will be a good idea. We won't see if we not check smile.
Also, give me your file content, because I see you have modified it a bit.

42

Re: Move important post topics only to News page

<?php
/**
* Displays custom page with news as links
*
* @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
* @package PunBB
*/

if (!defined('FORUM_ROOT'))
    define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';

define('FORUM_ALLOW_INDEX', 1);
define('FORUM_PAGE', 'Home');

// Setup breadcrumbs
$forum_page['crumbs'] = array(
    array($forum_config['o_board_title'], forum_link($forum_url['index'])),
    ucfirst(FORUM_PAGE)
);

require FORUM_ROOT.'header.php';

// START SUBST - <!-- forum_main -->
ob_start();

?>    <div class="main-head" style="margin-top: 2em">
        <h2 class="hn"><span>Latest news - Home</span></h2>
    </div>
    <div class="main-content main-message" style="margin : auto; text-align: center">
    <FONT size=3>
        <p>
            <u><ol>
            <li><a href="http://nairalanders.com/forum/topic/328/celebrities-tonto-dikeh-flaunts-her-tattoos-in-new-photos/">Tonto Dikeh Flaunts Her Tattoos In New Photos (Pictured)</a></li>
            <li><a href="http://nairalanders.com/forum/topic/274/music-videos-new-single-wizkid-jaiye-jaiye-ft-femi-kuti/">Jaiye Jaiye ft. Femi Kuti by Wizkid</a></li>
            <li><a href="http://nairalanders.com/forum/topic/306/music-videos-dr-sid-lady-don-dada-ft-don-jazzy/">Lady Don Dada ft. Don Jazzy by Dr. Sid</a></li>
            <li><a href="http://nairalanders.com/forum/topic/327/politics-why-jonathan-accused-organised-labour-of-corruption-cpc/">Why Jonathan Accused Organised Labour Of Corruption-CPC</a></li>
            <li><a href="http://nairalanders.com/forum/topic/326/european-football-qpr-vs-arsenal-today-at-530pm/">QPR Vs Arsenal Today At 5.30pm</a></li>     
            <li><a href="http://nairalanders.com/forum/topic/324/8-ways-to-keep-your-lady-happy/">8 Ways To Keep Your Lady Happy</a></li>
                <li><a href="http://nairalanders.com/forum/topic/323/one-year-after-rasheed-yekini-lives-on-in-our-hearts/">One Year After, Rasheed Yekini Lives On In Our Hearts</a></li>
                <li><a href="http://nairalanders.com/forum/topic/319/what-to-do-when-he-is-taking-too-long-to-propose/">What To Do When He Is Taking Too Long To Propose</a></li>
                <li><a href="http://nairalanders.com/forum/topic/320/tragic-lagos-polytechnic-student-raped-to-death-3-days-after-graduation/">Lagos polytechnic student raped to death 3 days after graduation</a></li>
                <li><a href="http://nairalanders.com/forum/topic/310/boko-haram-now-collecting-ransom/">Boko Haram Now Collecting Ransom</a></li>
                <li><a href="http://nairalanders.com/forum/topic/311/celebrities-who-died-of-drug-overdoses-and-how-they-died/">Celebrities Who Died Of Drug Overdoses And How They Died</a></li>
                <li><a href="http://nairalanders.com/forum/topic/312/how-is-your-state-governor-fighting-corruption/">How Is Your State Governor Fighting Corruption?</a></li>
                <li><a href="http://nairalanders.com/forum/topic/321/private-jet-efcc-probes-amaechi-over-missing-10m/">Private jet-EFCC probes Amaechi over missing $10m</a></li>
                <li><a href="http://nairalanders.com/forum/topic/316/age-in-relationships/">Age In Relationships</a></li>
                <li><a href="http://nairalanders.com/forum/topic/317/what-is-cheating-in-a-relationshipmarriage/">What Is Cheating In A Relationship/Marriage?</a></li>
                <li><a href="http://nairalanders.com/forum/topic/318/if-you-are-single-read-this-a-mothers-letter/">If You Are Single, Read This. (A Mother's Letter)</a></li>
            </ol>
        </p>
    </div>
    </FONT>
    </u>
<?php

$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);

ob_end_clean();
// END SUBST - <!-- forum_main -->



require FORUM_ROOT.'footer.php';


I tried to move the message to center, but it won't work. Maybe you can help out smile

43

Re: Move important post topics only to News page

Hmm... Try this and update your forum!

<?php
/**
* Displays custom page with news as links
*
* @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
* @package PunBB
*/
if (!defined('FORUM_ROOT'))
    define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';
define('FORUM_ALLOW_INDEX', 1);
define('FORUM_PAGE', 'Home');
// Setup breadcrumbs
$forum_page['crumbs'] = array(
    array($forum_config['o_board_title'], forum_link($forum_url['index'])),
    ucfirst(FORUM_PAGE)
);
require FORUM_ROOT.'header.php';
// START SUBST - <!-- forum_main -->
ob_start();
?>    <div class="main-head" style="margin-top: 2em">
        <h2 class="hn"><span>Latest news - Home</span></h2>
    </div>
    <div class="main-content main-message" style="font-size: 17px; text-decoration: underline;">
            <ol style="padding: 0 120pt;">
            <li><a href="http://nairalanders.com/forum/topic/328/celebrities-tonto-dikeh-flaunts-her-tattoos-in-new-photos/">Tonto Dikeh Flaunts Her Tattoos In New Photos (Pictured)</a></li>
            <li><a href="http://nairalanders.com/forum/topic/274/music-videos-new-single-wizkid-jaiye-jaiye-ft-femi-kuti/">Jaiye Jaiye ft. Femi Kuti by Wizkid</a></li>
            <li><a href="http://nairalanders.com/forum/topic/306/music-videos-dr-sid-lady-don-dada-ft-don-jazzy/">Lady Don Dada ft. Don Jazzy by Dr. Sid</a></li>
            <li><a href="http://nairalanders.com/forum/topic/327/politics-why-jonathan-accused-organised-labour-of-corruption-cpc/">Why Jonathan Accused Organised Labour Of Corruption-CPC</a></li>
            <li><a href="http://nairalanders.com/forum/topic/326/european-football-qpr-vs-arsenal-today-at-530pm/">QPR Vs Arsenal Today At 5.30pm</a></li>     
            <li><a href="http://nairalanders.com/forum/topic/324/8-ways-to-keep-your-lady-happy/">8 Ways To Keep Your Lady Happy</a></li>
                <li><a href="http://nairalanders.com/forum/topic/323/one-year-after-rasheed-yekini-lives-on-in-our-hearts/">One Year After, Rasheed Yekini Lives On In Our Hearts</a></li>
                <li><a href="http://nairalanders.com/forum/topic/319/what-to-do-when-he-is-taking-too-long-to-propose/">What To Do When He Is Taking Too Long To Propose</a></li>
                <li><a href="http://nairalanders.com/forum/topic/320/tragic-lagos-polytechnic-student-raped-to-death-3-days-after-graduation/">Lagos polytechnic student raped to death 3 days after graduation</a></li>
                <li><a href="http://nairalanders.com/forum/topic/310/boko-haram-now-collecting-ransom/">Boko Haram Now Collecting Ransom</a></li>
                <li><a href="http://nairalanders.com/forum/topic/311/celebrities-who-died-of-drug-overdoses-and-how-they-died/">Celebrities Who Died Of Drug Overdoses And How They Died</a></li>
                <li><a href="http://nairalanders.com/forum/topic/312/how-is-your-state-governor-fighting-corruption/">How Is Your State Governor Fighting Corruption?</a></li>
                <li><a href="http://nairalanders.com/forum/topic/321/private-jet-efcc-probes-amaechi-over-missing-10m/">Private jet-EFCC probes Amaechi over missing $10m</a></li>
                <li><a href="http://nairalanders.com/forum/topic/316/age-in-relationships/">Age In Relationships</a></li>
                <li><a href="http://nairalanders.com/forum/topic/317/what-is-cheating-in-a-relationshipmarriage/">What Is Cheating In A Relationship/Marriage?</a></li>
                <li><a href="http://nairalanders.com/forum/topic/318/if-you-are-single-read-this-a-mothers-letter/">If You Are Single, Read This. (A Mother's Letter)</a></li>
            </ol>
    </div>
<?php
$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <!-- forum_main -->


require FORUM_ROOT.'footer.php';

44 (edited by Rolex 2013-05-04 19:04)

Re: Move important post topics only to News page

Thanks, everything works fine. I'll wait for the update which will allow me just mark and send topic to Latest news page.

In the update, you may put guests online and registered users online at the foot. I tried here, but I got error. smile

Also, it should have the option that will allow admin change what the link title should be on the Latest news page.

Thank you,

45

Re: Move important post topics only to News page

Rolex wrote:

Thanks, everything works fine. I'll wait for the update which will allow me just mark and send topic to Latest news page.

Hmmm... and what about automatically grab topics title from specified forum?

Rolex wrote:

In the update, you may put guests online and registered users online at the foot. I tried here, but I got error.

Use this:

<?php
/**
* Displays custom page with news as links
*
* @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
* @package PunBB
*/
if (!defined('FORUM_ROOT'))
    define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';
// Load the index.php language file
require FORUM_ROOT.'lang/'.$forum_user['language'].'/index.php';
define('FORUM_ALLOW_INDEX', 1);
define('FORUM_PAGE', 'Home');
// Setup breadcrumbs
$forum_page['crumbs'] = array(
    array($forum_config['o_board_title'], forum_link($forum_url['index'])),
    ucfirst(FORUM_PAGE)
);
require FORUM_ROOT.'header.php';
// START SUBST - <!-- forum_main -->
ob_start();
?>    <div class="main-head" style="margin-top: 2em">
        <h2 class="hn"><span>Latest news - Home</span></h2>
    </div>
    <div class="main-content main-message" style="font-size: 17px; text-decoration: underline;">
            <ol style="padding: 0 120pt;">
            <li><a href="http://nairalanders.com/forum/topic/328/celebrities-tonto-dikeh-flaunts-her-tattoos-in-new-photos/">Tonto Dikeh Flaunts Her Tattoos In New Photos (Pictured)</a></li>
            <li><a href="http://nairalanders.com/forum/topic/274/music-videos-new-single-wizkid-jaiye-jaiye-ft-femi-kuti/">Jaiye Jaiye ft. Femi Kuti by Wizkid</a></li>
            <li><a href="http://nairalanders.com/forum/topic/306/music-videos-dr-sid-lady-don-dada-ft-don-jazzy/">Lady Don Dada ft. Don Jazzy by Dr. Sid</a></li>
            <li><a href="http://nairalanders.com/forum/topic/327/politics-why-jonathan-accused-organised-labour-of-corruption-cpc/">Why Jonathan Accused Organised Labour Of Corruption-CPC</a></li>
            <li><a href="http://nairalanders.com/forum/topic/326/european-football-qpr-vs-arsenal-today-at-530pm/">QPR Vs Arsenal Today At 5.30pm</a></li>     
            <li><a href="http://nairalanders.com/forum/topic/324/8-ways-to-keep-your-lady-happy/">8 Ways To Keep Your Lady Happy</a></li>
                <li><a href="http://nairalanders.com/forum/topic/323/one-year-after-rasheed-yekini-lives-on-in-our-hearts/">One Year After, Rasheed Yekini Lives On In Our Hearts</a></li>
                <li><a href="http://nairalanders.com/forum/topic/319/what-to-do-when-he-is-taking-too-long-to-propose/">What To Do When He Is Taking Too Long To Propose</a></li>
                <li><a href="http://nairalanders.com/forum/topic/320/tragic-lagos-polytechnic-student-raped-to-death-3-days-after-graduation/">Lagos polytechnic student raped to death 3 days after graduation</a></li>
                <li><a href="http://nairalanders.com/forum/topic/310/boko-haram-now-collecting-ransom/">Boko Haram Now Collecting Ransom</a></li>
                <li><a href="http://nairalanders.com/forum/topic/311/celebrities-who-died-of-drug-overdoses-and-how-they-died/">Celebrities Who Died Of Drug Overdoses And How They Died</a></li>
                <li><a href="http://nairalanders.com/forum/topic/312/how-is-your-state-governor-fighting-corruption/">How Is Your State Governor Fighting Corruption?</a></li>
                <li><a href="http://nairalanders.com/forum/topic/321/private-jet-efcc-probes-amaechi-over-missing-10m/">Private jet-EFCC probes Amaechi over missing $10m</a></li>
                <li><a href="http://nairalanders.com/forum/topic/316/age-in-relationships/">Age In Relationships</a></li>
                <li><a href="http://nairalanders.com/forum/topic/317/what-is-cheating-in-a-relationshipmarriage/">What Is Cheating In A Relationship/Marriage?</a></li>
                <li><a href="http://nairalanders.com/forum/topic/318/if-you-are-single-read-this-a-mothers-letter/">If You Are Single, Read This. (A Mother's Letter)</a></li>
            </ol>
    </div>
<?php

($hook = get_hook('in_stats_end')) ? eval($hook) : null;
($hook = get_hook('in_users_online_start')) ? eval($hook) : null;

if ($forum_config['o_users_online'] == '1')
{
    // Fetch users online info and generate strings for output
    $query = array(
        'SELECT'    => 'o.user_id, o.ident',
        'FROM'        => 'online AS o',
        'WHERE'        => 'o.idle=0',
        'ORDER BY'    => 'o.ident'
    );

    ($hook = get_hook('in_users_online_qr_get_online_info')) ? eval($hook) : null;
    $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
    $forum_page['num_guests'] = $forum_page['num_users'] = 0;
    $users = array();

    while ($forum_user_online = $forum_db->fetch_assoc($result))
    {
        ($hook = get_hook('in_users_online_add_online_user_loop')) ? eval($hook) : null;

        if ($forum_user_online['user_id'] > 1)
        {
            $users[] = ($forum_user['g_view_users'] == '1') ? '<a href="'.forum_link($forum_url['user'], $forum_user_online['user_id']).'">'.forum_htmlencode($forum_user_online['ident']).'</a>' : forum_htmlencode($forum_user_online['ident']);
            ++$forum_page['num_users'];
        }
        else
            ++$forum_page['num_guests'];
    }

    $forum_page['online_info'] = array();
    $forum_page['online_info']['guests'] = ($forum_page['num_guests'] == 0) ? $lang_index['Guests none'] : sprintf((($forum_page['num_guests'] == 1) ? $lang_index['Guests single'] : $lang_index['Guests plural']), forum_number_format($forum_page['num_guests']));
    $forum_page['online_info']['users'] = ($forum_page['num_users'] == 0) ? $lang_index['Users none'] : sprintf((($forum_page['num_users'] == 1) ? $lang_index['Users single'] : $lang_index['Users plural']), forum_number_format($forum_page['num_users']));

    ($hook = get_hook('in_users_online_pre_online_info_output')) ? eval($hook) : null;
?>
<div id="brd-online" class="gen-content">
    <h3 class="hn"><span><?php printf($lang_index['Currently online'], implode($lang_index['Online stats separator'], $forum_page['online_info'])) ?></span></h3>
<?php if (!empty($users)): ?>
    <p><?php echo implode($lang_index['Online list separator'], $users) ?></p>
<?php endif; ($hook = get_hook('in_new_online_data')) ? eval($hook) : null; ?>
</div>
<?php

    ($hook = get_hook('in_users_online_end')) ? eval($hook) : null;
}

($hook = get_hook('in_info_end')) ? eval($hook) : null;

$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_info -->', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <!-- forum_main -->
require FORUM_ROOT.'footer.php';

46 (edited by Rolex 2013-05-04 20:08)

Re: Move important post topics only to News page

Hmmm... and what about automatically grab topics title from specified forum?

That sounds nice, but it should be optional.

Check: http://nairalanders.com/forum/latest_ne … 20Copy.php

The Page name appears twice. Please fix.


And the main message, how many links per page? I think max should be 50, then old ones make page 2.

47

Re: Move important post topics only to News page

<?php
/**
* Displays custom page with news as links
*
* @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
* @package PunBB
*/
if (!defined('FORUM_ROOT'))
    define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';
// Load the index.php language file
require FORUM_ROOT.'lang/'.$forum_user['language'].'/index.php';
define('FORUM_ALLOW_INDEX', 1);
define('FORUM_PAGE', 'Latest news');
// Setup breadcrumbs
$forum_page['crumbs'] = array(
    array($forum_config['o_board_title'], forum_link($forum_url['index'])),
    ucfirst(FORUM_PAGE)
);
require FORUM_ROOT.'header.php';
// START SUBST - <!-- forum_main -->
ob_start();
?>    <div class="main-head" style="margin-top: 2em">
        <h2 class="hn"><span>Latest news - Home</span></h2>
    </div>
    <div class="main-content main-message" style="font-size: 17px; text-decoration: underline;">
            <ol style="padding: 0 120pt;">
            <li><a href="http://nairalanders.com/forum/topic/328/celebrities-tonto-dikeh-flaunts-her-tattoos-in-new-photos/">Tonto Dikeh Flaunts Her Tattoos In New Photos (Pictured)</a></li>
            <li><a href="http://nairalanders.com/forum/topic/274/music-videos-new-single-wizkid-jaiye-jaiye-ft-femi-kuti/">Jaiye Jaiye ft. Femi Kuti by Wizkid</a></li>
            <li><a href="http://nairalanders.com/forum/topic/306/music-videos-dr-sid-lady-don-dada-ft-don-jazzy/">Lady Don Dada ft. Don Jazzy by Dr. Sid</a></li>
            <li><a href="http://nairalanders.com/forum/topic/327/politics-why-jonathan-accused-organised-labour-of-corruption-cpc/">Why Jonathan Accused Organised Labour Of Corruption-CPC</a></li>
            <li><a href="http://nairalanders.com/forum/topic/326/european-football-qpr-vs-arsenal-today-at-530pm/">QPR Vs Arsenal Today At 5.30pm</a></li>     
            <li><a href="http://nairalanders.com/forum/topic/324/8-ways-to-keep-your-lady-happy/">8 Ways To Keep Your Lady Happy</a></li>
                <li><a href="http://nairalanders.com/forum/topic/323/one-year-after-rasheed-yekini-lives-on-in-our-hearts/">One Year After, Rasheed Yekini Lives On In Our Hearts</a></li>
                <li><a href="http://nairalanders.com/forum/topic/319/what-to-do-when-he-is-taking-too-long-to-propose/">What To Do When He Is Taking Too Long To Propose</a></li>
                <li><a href="http://nairalanders.com/forum/topic/320/tragic-lagos-polytechnic-student-raped-to-death-3-days-after-graduation/">Lagos polytechnic student raped to death 3 days after graduation</a></li>
                <li><a href="http://nairalanders.com/forum/topic/310/boko-haram-now-collecting-ransom/">Boko Haram Now Collecting Ransom</a></li>
                <li><a href="http://nairalanders.com/forum/topic/311/celebrities-who-died-of-drug-overdoses-and-how-they-died/">Celebrities Who Died Of Drug Overdoses And How They Died</a></li>
                <li><a href="http://nairalanders.com/forum/topic/312/how-is-your-state-governor-fighting-corruption/">How Is Your State Governor Fighting Corruption?</a></li>
                <li><a href="http://nairalanders.com/forum/topic/321/private-jet-efcc-probes-amaechi-over-missing-10m/">Private jet-EFCC probes Amaechi over missing $10m</a></li>
                <li><a href="http://nairalanders.com/forum/topic/316/age-in-relationships/">Age In Relationships</a></li>
                <li><a href="http://nairalanders.com/forum/topic/317/what-is-cheating-in-a-relationshipmarriage/">What Is Cheating In A Relationship/Marriage?</a></li>
                <li><a href="http://nairalanders.com/forum/topic/318/if-you-are-single-read-this-a-mothers-letter/">If You Are Single, Read This. (A Mother's Letter)</a></li>
            </ol>
    </div>
<?php

($hook = get_hook('in_stats_end')) ? eval($hook) : null;
($hook = get_hook('in_users_online_start')) ? eval($hook) : null;

if ($forum_config['o_users_online'] == '1')
{
    // Fetch users online info and generate strings for output
    $query = array(
        'SELECT'    => 'o.user_id, o.ident',
        'FROM'        => 'online AS o',
        'WHERE'        => 'o.idle=0',
        'ORDER BY'    => 'o.ident'
    );

    ($hook = get_hook('in_users_online_qr_get_online_info')) ? eval($hook) : null;
    $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
    $forum_page['num_guests'] = $forum_page['num_users'] = 0;
    $users = array();

    while ($forum_user_online = $forum_db->fetch_assoc($result))
    {
        ($hook = get_hook('in_users_online_add_online_user_loop')) ? eval($hook) : null;

        if ($forum_user_online['user_id'] > 1)
        {
            $users[] = ($forum_user['g_view_users'] == '1') ? '<a href="'.forum_link($forum_url['user'], $forum_user_online['user_id']).'">'.forum_htmlencode($forum_user_online['ident']).'</a>' : forum_htmlencode($forum_user_online['ident']);
            ++$forum_page['num_users'];
        }
        else
            ++$forum_page['num_guests'];
    }

    $forum_page['online_info'] = array();
    $forum_page['online_info']['guests'] = ($forum_page['num_guests'] == 0) ? $lang_index['Guests none'] : sprintf((($forum_page['num_guests'] == 1) ? $lang_index['Guests single'] : $lang_index['Guests plural']), forum_number_format($forum_page['num_guests']));
    $forum_page['online_info']['users'] = ($forum_page['num_users'] == 0) ? $lang_index['Users none'] : sprintf((($forum_page['num_users'] == 1) ? $lang_index['Users single'] : $lang_index['Users plural']), forum_number_format($forum_page['num_users']));

    ($hook = get_hook('in_users_online_pre_online_info_output')) ? eval($hook) : null;
?>
<div id="brd-online" class="gen-content">
    <h3 class="hn"><span><?php printf($lang_index['Currently online'], implode($lang_index['Online stats separator'], $forum_page['online_info'])) ?></span></h3>
<?php if (!empty($users)): ?>
    <p><?php echo implode($lang_index['Online list separator'], $users) ?></p>
<?php endif; ($hook = get_hook('in_new_online_data')) ? eval($hook) : null; ?>
</div>
<?php

    ($hook = get_hook('in_users_online_end')) ? eval($hook) : null;
}

($hook = get_hook('in_info_end')) ? eval($hook) : null;

$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <!-- forum_main -->
require FORUM_ROOT.'footer.php';

48

Re: Move important post topics only to News page

It's fine now. Thanks very much, you've really been helpful. I will keep in touch with this post till update is available.

If any other thing, I will let you know.

Thanks again

49

Re: Move important post topics only to News page

I thought to myself that what do you want is really useless. Instead of that you can simply add a link to menu to your news forum...

50

Re: Move important post topics only to News page

@Trace, I do not understand.