Login box

Download plugins, language packs and stuff.

Postby ivanh » Thu Aug 16, 2007 2:45 pm

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?
ivanh
 
Posts: 75
Joined: Thu Aug 16, 2007 2:41 pm

Postby FI-DD » Mon Aug 20, 2007 6:34 pm

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.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby al3loo » Fri Sep 21, 2007 12:16 am

I think its good now.. but still there is a problem :roll:

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,
al3loo
 
Posts: 65
Joined: Sat Aug 04, 2007 2:19 am

Postby scottdallas » Fri Sep 21, 2007 6:03 am

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
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby al3loo » Fri Sep 21, 2007 8:21 pm

Hello,

:roll: 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. :D
al3loo
 
Posts: 65
Joined: Sat Aug 04, 2007 2:19 am

Postby scottdallas » Sat Sep 22, 2007 7:24 pm

Here's exactly what I use for my loginbox code.

Code: Select all
<?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.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby al3loo » Wed Sep 26, 2007 3:13 pm

hello!

Thank you very very much :D ..
This is the best method for it .. :wink:






Best Regards,
al3loo
 
Posts: 65
Joined: Sat Aug 04, 2007 2:19 am

Postby ivanh » Mon Apr 28, 2008 1:54 pm

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?
ivanh
 
Posts: 75
Joined: Thu Aug 16, 2007 2:41 pm

Postby scottdallas » Tue Apr 29, 2008 12:39 am

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: Select all
<?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?
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby ivanh » Tue Apr 29, 2008 2:14 am

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
ivanh
 
Posts: 75
Joined: Thu Aug 16, 2007 2:41 pm

Postby sidtheduck » Tue Apr 29, 2008 4:48 pm

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: Select all
ob_start();


Then at the very end of the page, after everything else, add the following lines:
Code: Select all
<?
$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! :D
User avatar
sidtheduck
 
Posts: 71
Joined: Fri Mar 28, 2008 5:17 pm

Postby ivanh » Tue Apr 29, 2008 5:56 pm

hehe worth the try but doesnt work
ivanh
 
Posts: 75
Joined: Thu Aug 16, 2007 2:41 pm

Postby sidtheduck » Tue Apr 29, 2008 6:47 pm

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: Select all
header('Location: '.$PHP_SELF);
change to:
Code: Select all
@header('Location: '.$PHP_SELF);

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

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


That should keep the errors from showing up.
User avatar
sidtheduck
 
Posts: 71
Joined: Fri Mar 28, 2008 5:17 pm

Postby ivanh » Tue Apr 29, 2008 7:13 pm

i've just tried it it does get rid of the errors but does not log me in or out lol
ivanh
 
Posts: 75
Joined: Thu Aug 16, 2007 2:41 pm

Postby sidtheduck » Tue Apr 29, 2008 7:29 pm

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: Select all
<?//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: Select all
include("path_to_cute/loginbox.php");
User avatar
sidtheduck
 
Posts: 71
Joined: Fri Mar 28, 2008 5:17 pm

PreviousNext

Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests

cron