This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Forum PM on frontpage


avatar
error 232
From: -
Forum PM on frontpage

How can I do that? Some help will be appreciated. Something like this:

Welcome back user! You have 0 personal message(s)

text in bold linkable to forum PM.

IPB 2.3.5

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Forum PM on frontpage
avatar
Editor
0
From: -
Whn I add PHP part in templates and clear cache it disapears.

Odd, both functions are not related Confused Face

Can't find where to add PHP part in imported templates.

As files in the template directory? Then you need to create PHP files. For example, the HTML part of site_header is in site_header.html and the php part in site_header.php (if there is a PHP part).
1 Re: Forum PM on frontpage
avatar
OP 232
From: -
Whn I add PHP part in templates and clear cache it disapears. Can't find where to add PHP part in imported templates.

Some manual will help a lot.
1 Re: Forum PM on frontpage
avatar
OP 232
From: -
That works fine. Thanks again.
1 Re: Forum PM on frontpage
avatar
Editor
0
From: -
Try to change the first line:
global $uwrapper;


to:
global $uwrapper, $preferences;
1 Re: Forum PM on frontpage
avatar
OP 232
From: -
Query: SELECT new_msg FROM members WHERE name = '' LIMIT 1
Error: 1146 Table 'm**norg_.members' doesn't exist

This is what i get when added PHP part.
1 Re: Forum PM on frontpage
avatar
Editor
0
From: -
You need to click on "Add PHP part to this template" and then copy the code into the text area.
1 Re: Forum PM on frontpage
avatar
OP 232
From: -
Sory, but where to add PHP part?
1 Re: Forum PM on frontpage
avatar
Editor
0
From: -
Try the following template modification. Edit the template site_login_user and replace the HTML part with:

<!-- Template: site_login_user -->

<h4>Welcome back {$insert['user_username']}</h4>
<h5>You have <a href="https://www.contentteller.com/{$preferences[ 'website_uwrapper_forumpath' ] }/index.php?act=Msg&CODE=01"><strong>{$new_msg} personal message(s)</strong></a>. <a href="https://www.contentteller.com/contentteller.php?ct=users&amp;action=logout" rel="nofollow">Click here</a> to logout. To visit the user control panel <a href="https://www.contentteller.com/contentteller{$insert['param_ext']}{$insert['param_ct']}users{$insert['param_action']}controlpanel{$insert['param_page']}index.html" rel="nofollow">click here</a> {$insert['private_messages']}</h5>
<br />


and add the following PHP part:

global $uwrapper;

$uwrapper -> bbconnect();
$results = $uwrapper -> bbquery( "SELECT new_msg FROM " . $uwrapper -> bbescape( $preferences[ 'website_uwrapper_prefix' ] ) . "members WHERE name = '" . $uwrapper -> bbescape ( $insert['user_username'] ) ."' LIMIT 1" );
list( $new_msg ) = $uwrapper -> bbrow( $results );
$uwrapper -> bbclose();


Let me know if this work.

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.