Forum PM on frontpage
error 232
From: -
From: -
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
Philipp Esselbach
From: -
Editor
0From: -
Whn I add PHP part in templates and clear cache it disapears.
Odd, both functions are not related
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
error
OP
232
From: -
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.
Some manual will help a lot.
1 Re: Forum PM on frontpage
error
OP
232
From: -
From: -
That works fine. Thanks again.
1 Re: Forum PM on frontpage
Philipp Esselbach
From: -
Editor
0From: -
Try to change the first line:
to:
global $uwrapper;
to:
global $uwrapper, $preferences;
1 Re: Forum PM on frontpage
error
OP
232
From: -
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.
Error: 1146 Table 'm**norg_.members' doesn't exist
This is what i get when added PHP part.
1 Re: Forum PM on frontpage
Philipp Esselbach
From: -
Editor
0From: -
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
error
OP
232
From: -
From: -
Sory, but where to add PHP part?
1 Re: Forum PM on frontpage
Philipp Esselbach
From: -
Editor
0From: -
Try the following template modification. Edit the template site_login_user and replace the HTML part with:
and add the following PHP part:
Let me know if this work.
<!-- 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&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.
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