Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Login box
Goto page Previous  1, 2, 3  Next
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
Login box
Author Message
ivanh



Joined: 16 Aug 2007
Posts: 71

Post Reply with quote
hey there

i get this error:

Quote:
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:

Quote:
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 View user's profile Send private message Visit poster's website
Guest








Please login to hide the ads.

FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2683
Location: Germany

Post Reply with quote
ivanh wrote:
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 View user's profile Send private message
al3loo



Joined: 04 Aug 2007
Posts: 35

Post Reply with quote
I think its good now.. but still there is a problem Rolling Eyes

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 Wink ...

Regards,

Fri Sep 21, 2007 12:16 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1808
Location: US

Post Reply with quote
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 Smile
last update: 07-22-08: 8:30 pm
Fri Sep 21, 2007 6:03 am View user's profile Send private message Visit poster's website AIM Address
al3loo



Joined: 04 Aug 2007
Posts: 35

Post Reply with quote
Hello,

Rolling Eyes 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. Very Happy
Fri Sep 21, 2007 8:21 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1808
Location: US

Post Reply with quote
Here's exactly what I use for my loginbox code.

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 Smile
last update: 07-22-08: 8:30 pm
Sat Sep 22, 2007 7:24 pm View user's profile Send private message Visit poster's website AIM Address
al3loo



Joined: 04 Aug 2007
Posts: 35

Post Reply with quote
hello!

Thank you very very much Very Happy ..
This is the best method for it .. Wink






Best Regards,

Wed Sep 26, 2007 3:13 pm View user's profile Send private message
ivanh



Joined: 16 Aug 2007
Posts: 71

Post Reply with quote
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 View user's profile Send private message Visit poster's website
scottdallas



Joined: 04 May 2006
Posts: 1808
Location: US

Post Reply with quote
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:

Code:
<?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 Smile
last update: 07-22-08: 8:30 pm
Tue Apr 29, 2008 12:39 am View user's profile Send private message Visit poster's website AIM Address
ivanh



Joined: 16 Aug 2007
Posts: 71

Post Reply with quote
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 View user's profile Send private message Visit poster's website
sidtheduck



Joined: 28 Mar 2008
Posts: 70

Post Reply with quote
ivanh wrote:
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:
Code:
ob_start();


Then at the very end of the page, after everything else, add the following lines:
Code:
<?
$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! Very Happy
Tue Apr 29, 2008 4:48 pm View user's profile Send private message
ivanh



Joined: 16 Aug 2007
Posts: 71

Post Reply with quote
hehe worth the try but doesnt work
Tue Apr 29, 2008 5:56 pm View user's profile Send private message Visit poster's website
sidtheduck



Joined: 28 Mar 2008
Posts: 70

Post Reply with quote
ivanh wrote:
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:
Code:
header('Location: '.$PHP_SELF);
change to:
Code:
@header('Location: '.$PHP_SELF);

Line 61:
Code:
setcookie('login_username', '', time() - 3600 * 24 * 365);
change to:
Code:
@setcookie('login_username', '', time() - 3600 * 24 * 365);

Line 67:
Code:
header('Location: '.$PHP_SELF);
change to:
Code:
@header('Location: '.$PHP_SELF);


That should keep the errors from showing up.
Tue Apr 29, 2008 6:47 pm View user's profile Send private message
ivanh



Joined: 16 Aug 2007
Posts: 71

Post Reply with quote
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 View user's profile Send private message Visit poster's website
sidtheduck



Joined: 28 Mar 2008
Posts: 70

Post Reply with quote
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:
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:
Code:
include("path_to_cute/loginbox.php");

Tue Apr 29, 2008 7:29 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.