| Author |
Message |
ivanh
Joined: 16 Aug 2007 Posts: 71
|
|
|
|
hey there
i get this error:
 |  | Fatal error: Call to undefined function: cute_lang() in /u/9/3/1458539/thanh_beta/site/loginbox.php on line 14 |
is there a way to solve this?
my php skills is very limited
thanks in advance
Another question involving the installation process:
 |  | Put this at the beginning of your news page: include('path_to_cute/loginbox.php');
Put this where you want to show the login box in your news page: include('path_to_cute/loginbox.php'); |
so we insert this php script twice? i understand the one where you go "where u want to show login box", however the otherone states, "at the beginning of your news page" which confuses me. do you mean the show_news.php or something else? please explain : )
i just realised that there is cutenews and cutenewsru
i am running cutenews - this could be the problem correct?
|
|
| Thu Aug 16, 2007 2:45 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2683 Location: Germany |
|
|
|
 |  | i just realised that there is cutenews and cutenewsru
i am running cutenews - this could be the problem correct? |
Yes, that's the problem. Both scripts are similar but not the same and not compatible.
|
|
| Mon Aug 20, 2007 6:34 pm |
|
 |
al3loo
Joined: 04 Aug 2007 Posts: 35
|
|
|
|
I think its good now.. but still there is a problem
I see there is no connection between the home page (loginBox) and the admin of cutenews. Also, if you login in homepage and then get in news page you'll can't logout .. anyway you will can't; because it's just (logout) in home page but in fact it's still (login in) in admin page ..
I hope you develop that, I have a suggestion to that you can add checkBox to make users choose if they want to remembering or not like this forum ...
Regards,
|
|
| Fri Sep 21, 2007 12:16 am |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1808 Location: US |
|
|
|
The loginbox and ability to keep users logged in and remembered on the site is developed pretty well.. it's just a matter of figuring out how to utilize it. For example, www.linkvertise.org & www.embedtube.com
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Fri Sep 21, 2007 6:03 am |
|
 |
al3loo
Joined: 04 Aug 2007 Posts: 35
|
|
|
|
Hello,
I don't know if I used it wrong, but all what I do is that you say:
1. I put <? include('cutepath/loginbox.php'); ?> below <? include('cutepath/head.php'); ?> right? Isn't it.
2. I put <? include('cutepath/loginbox.php'); ?> where the loginbox show up.
3. I tried to make some login with different users to test it..
4. I saw there is many faults with it ..
I hope you give me the steps to the best utilizing for it.
|
|
| Fri Sep 21, 2007 8:21 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1808 Location: US |
|
|
|
Here's exactly what I use for my loginbox code.
 |  | <?php include("admin/head.php"); ?><?php include("admin/loginbox.php"); ?><?php include("admin/loginbox.php"); ?> |
I thought the same thing.. weird.. include it twice? But, whatever.. yes include it twice.. and yes it'll work lol
It's very touchy though, you are right. This is why I put the login box in an iframe.. if you modify too much information.. especially header information.. it will error.. but obviously you have a website and a layout so you want to be able to modify your layout and template and know that the login box is going to work too.. so if you put the code I wrote in an iframe by itself it can run stand-alone and it won't generate any errors, plus next time any page refreshes.. if you used any 'if logged in' / 'else' code throughout your site.. it will change to show the 'logged in' info..
www.linkvertise.org/login.php
The login box is in an iframe.. I think it looks nice like that plus.. I've never seen login box that almost seems interactive rather than causing the whole page to refresh.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Sat Sep 22, 2007 7:24 pm |
|
 |
al3loo
Joined: 04 Aug 2007 Posts: 35
|
|
|
|
hello!
Thank you very very much ..
This is the best method for it ..
Best Regards,
|
|
| Wed Sep 26, 2007 3:13 pm |
|
 |
ivanh
Joined: 16 Aug 2007 Posts: 71
|
|
|
|
hey
i installed a fresh version n reg mod
i get this error again
Warning: Cannot modify header information - headers already sent by (output started at /home/cha15775/public_html/nganhthanh/index.php:3) in /home/cha15775/public_html/nganhthanh/options/loginbox.php on line 61
Warning: Cannot modify header information - headers already sent by (output started at /home/cha15775/public_html/nganhthanh/index.php:3) in /home/cha15775/public_html/nganhthanh/options/loginbox.php on line 67
how do you fix this again? anyhelp?
|
|
| Mon Apr 28, 2008 1:54 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1808 Location: US |
|
|
|
If you include the loginbox it tries to load header information again.. which you see it errors because of that. That's why the only way I could ever get the loginbox to work was in an iframe.. just iframe a file with code in it like:
 |  | <?php include("admin/loginbox.php"); ?>
<?php include("admin/loginbox.php"); ?> |
Now the loginbox is completely solo from your page but you can implement it anywhere. Does that help you out?
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Tue Apr 29, 2008 12:39 am |
|
 |
ivanh
Joined: 16 Aug 2007 Posts: 71
|
|
|
|
ya i already knew that way you did - lol u use a lot of iframes i see ;p
but i dont want to use iframe cos its not strict validated
im sure there is another way around this or someone knows why sometimes it worked soemtimes it doesnt =s
|
|
| Tue Apr 29, 2008 2:14 am |
|
 |
sidtheduck

Joined: 28 Mar 2008 Posts: 70
|
|
|
|
 |  | im sure there is another way around this or someone knows why sometimes it worked soemtimes it doesnt =s | If you don't want to use an iframe, try this.
At the very beginning of your news page ( even before the include("path_to_cute/head.php"); but after the initial "<?" ) add:  |  | ob_start(); |
Then at the very end of the page, after everything else, add the following lines:  |  | <?
$output = ob_get_contents();
ob_end_clean();
echo $output;
?> |
That *should* clear it up for you, but it also buffers all of your output, so you *may* run into trouble if you have a lot of content on your page and a low memory_limit in your server settings. Just a notice that this may not solve everyone's problem, but it should work for most! 
|
|
| Tue Apr 29, 2008 4:48 pm |
|
 |
ivanh
Joined: 16 Aug 2007 Posts: 71
|
|
|
|
hehe worth the try but doesnt work
|
|
| Tue Apr 29, 2008 5:56 pm |
|
 |
sidtheduck

Joined: 28 Mar 2008 Posts: 70
|
|
|
|
 |  | hehe worth the try but doesnt work | hmmm . . . I guess you have a combination of HTML and PHP? That's probably output buffering isn't working.
You can suppress the errors by doing the following to 'loginbox.php'.
Line 55:  |  | header('Location: '.$PHP_SELF); | change to:  |  | @header('Location: '.$PHP_SELF); |
Line 61:  |  | setcookie('login_username', '', time() - 3600 * 24 * 365); | change to:  |  | @setcookie('login_username', '', time() - 3600 * 24 * 365); |
Line 67:  |  | header('Location: '.$PHP_SELF); | change to:  |  | @header('Location: '.$PHP_SELF); |
That should keep the errors from showing up.
|
|
| Tue Apr 29, 2008 6:47 pm |
|
 |
ivanh
Joined: 16 Aug 2007 Posts: 71
|
|
|
|
i've just tried it it does get rid of the errors but does not log me in or out lol
|
|
| Tue Apr 29, 2008 7:13 pm |
|
 |
sidtheduck

Joined: 28 Mar 2008 Posts: 70
|
|
|
|
nuts! One last time (this is all I have for suggestions without actually seeing your full code).
At the very top, this should be your code:
 |  |
<?//This is the very first line of your page, even above DOCTYPE declarations, etc.
ob_start();
include("path_to_cute/head.php");
include("path_to_cute/loginbox.php");
ob_end_flush();
?>
|
Then, later on in the code add your second:  |  | include("path_to_cute/loginbox.php"); |
|
|
| Tue Apr 29, 2008 7:29 pm |
|
 |
|