Go Back   Pligg CMS Forum > Pligg Development > Bug Report

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-03-2006, 07:55 PM
dwg dwg is offline
New Pligger
 
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
login.php shows errors outside of templates

First example (lines 24 & 25):
echo '<div id="contents">'."\n";
echo '<div id="loginform">'."\n";

are printed before anything, and are not inside the templates.

Also, any errors use an echo instead of putting it in a smarty variable.
Reply With Quote
  #2 (permalink)  
Old 04-10-2006, 11:04 AM
dwg dwg is offline
New Pligger
 
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Quick Fix

1. Replace all "echo " statements with "$msg .= ".
2. Change the first "$msg .= " to "$msg = "
3. Move the last two "$msg .= " statements that have the closing "</div>" tags to before the "$main_smarty->display($the_template . '/generic_main.tpl');" statement.
4. Add the following line after the last "$msg .= " statement and before the smarty display statement:
$main_smarty->assign('message', $msg);

5. Add {$message} to your login_center.tpl template wherever you want, but after the "{config_load file="../libs/lang.conf"}" line.

Should now work and put the errors/messages within your template.
Reply With Quote
  #3 (permalink)  
Old 04-11-2006, 02:42 AM
New Pligger
 
Join Date: Apr 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Great tip... I'm going hunting for other echos now.
Reply With Quote
  #4 (permalink)  
Old 04-11-2006, 05:06 PM
New Pligger
 
Join Date: Apr 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
One litte fix for this... The original line,

echo ("<p>".PLIGG_PassEmail_SendSuccess."</p>");

is displayed on the forgotten passward step 2 page, so change it to:

$msg .= '<p>'.PLIGG_PassEmail_SendSuccess.'</p>';
$main_smarty->assign('message', $msg);

and in ForgottenPassword_Step2.tpl add the first line:

{$message}
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
After switching templates, yget still shows jlebeau Customization Assistance 5 08-11-2008 11:28 PM
Uploaded Templates do not show in the list exstatic General Help 2 08-11-2008 08:24 PM
Parent categories shows errors and stay empty Andtony General Help 3 07-24-2008 05:22 AM
Pligg Templates for Sale / Custom Templates Available carpathios Template Sales 3 11-15-2007 10:47 AM
installation errors when PHP warnings enabled betagirl Installation and Upgrade Help 4 10-16-2007 11:22 AM


Search Engine Friendly URLs by vBSEO 3.2.0