FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » A few questions
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
A few questions [message #34329] Fri, 20 October 2006 21:13 Go to next message
Dan_   United Kingdom
Messages: 14
Registered: October 2006
Karma: 0
Junior Member
Hi,
I just got FudForum and it looks really good. I just got a few questions about it.
1)Can I allow users to have custom rank names after a certain amount of posts, and if so how?
2)In which .tmpl file is the legend at the bottom in?
3)This one i can't remember at the moment lol, but it will come to me.
4) Which is the .php file (and where) that sets the cookie when a user logs in and deletes it when they log out?
Thanks! Dan_

[Updated on: Sat, 21 October 2006 14:10]

Report message to a moderator

Re: A few questions [message #34334 is a reply to message #34329] Sat, 21 October 2006 06:52 Go to previous messageGo to next message
Dan_   United Kingdom
Messages: 14
Registered: October 2006
Karma: 0
Junior Member
Oh yeah, I remember 3) now lol:
3) How can i make it so any posts in a certain forum don't count towards overall post count?
Thanks!
Re: A few questions [message #34353 is a reply to message #34329] Sun, 22 October 2006 21:56 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
1) You can assign custom "ranks" to users via the user manager admin control panel
2) index.tmpl
3) You cannot without editing the forum's source code.
4) User authentication is handled by login.php.t


FUDforum Core Developer
Re: A few questions [message #34371 is a reply to message #34329] Tue, 24 October 2006 14:30 Go to previous messageGo to next message
Dan_   United Kingdom
Messages: 14
Registered: October 2006
Karma: 0
Junior Member
Ok, cheers. Thanks for the help Smile
Re: A few questions [message #34376 is a reply to message #34329] Tue, 24 October 2006 16:06 Go to previous messageGo to next message
Dan_   United Kingdom
Messages: 14
Registered: October 2006
Karma: 0
Junior Member
Hi,
I have a couple of things related to my previous questions.

I found login.php (the one in theme/default) and located this:
if ($use_cookies) {
			setcookie($GLOBALS['COOKIE_NAME'], $s[0], __request_timestamp__+$GLOBALS['COOKIE_TIMEOUT'], $GLOBALS['COOKIE_PATH'], $GLOBALS['COOKIE_DOMAIN']);

I presume this is the part that sets the cookie to say if a user is logged in? Because I added another setcookie() but when I log in, my one isn't set. Oh and I also made the file readonly, because otherwise it seems to get overwritten.

Also, I see about the custom rank titles thing (as in the one in your name? Core Developer, Administrator etc..) is there a way I can let the user pick their own one if they have over a certain number of posts?

Thanks,
Dan_
Re: A few questions [message #34381 is a reply to message #34376] Wed, 25 October 2006 14:09 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This cookie sets the user's session id. This id will then be used by the forum to identify the user.

The forum will try to re-use the existing cookie if possible simply identifying internally that the session found within the cookie belongs to a certain user.

No, the addition of custom ranks can only be performed by Admins and user-moderators.


FUDforum Core Developer
Re: A few questions [message #34383 is a reply to message #34329] Wed, 25 October 2006 14:19 Go to previous messageGo to next message
Dan_   United Kingdom
Messages: 14
Registered: October 2006
Karma: 0
Junior Member
Ok, thanks again for the replies. I will add the user ranks thing to the suggestions.

I'd like to set my own cookie when the user logs in and remove it when they log out, where would i add this setcookie() in the code?

Thanks,
Dan_
Re: A few questions [message #34386 is a reply to message #34383] Wed, 25 October 2006 14:26 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
login.php.t, this script is responsible for both login & logout functions.

FUDforum Core Developer
Re: A few questions [message #34388 is a reply to message #34329] Wed, 25 October 2006 14:53 Go to previous messageGo to next message
Dan_   United Kingdom
Messages: 14
Registered: October 2006
Karma: 0
Junior Member
You mean login.php in theme/default?
I can't find login.php.t
Re: A few questions [message #34397 is a reply to message #34388] Thu, 26 October 2006 14:04 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
login.php.t is the actual source file that can be found inside the src/ directory. The login.php is the compiled file.

FUDforum Core Developer
Re: A few questions [message #34417 is a reply to message #34329] Fri, 27 October 2006 15:38 Go to previous messageGo to next message
Dan_   United Kingdom
Messages: 14
Registered: October 2006
Karma: 0
Junior Member
Ok, thanks found it, but I can't see setcookie() in it?
Re: A few questions [message #34421 is a reply to message #34417] Fri, 27 October 2006 17:51 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
set cookie is done by the user_login() function inside users_reg.inc.t

FUDforum Core Developer
Re: A few questions [message #34438 is a reply to message #34329] Sun, 29 October 2006 19:29 Go to previous messageGo to next message
Dan_   United Kingdom
Messages: 14
Registered: October 2006
Karma: 0
Junior Member
Ok cheers. I've added an extra setcookie() to the code in the user_login(), but when I login it doesn't set my cookie. Any ideas?
Re: A few questions [message #34458 is a reply to message #34329] Tue, 31 October 2006 16:56 Go to previous messageGo to next message
Dan_   United Kingdom
Messages: 14
Registered: October 2006
Karma: 0
Junior Member
Not helpful Confused
Let's play hangman!
I'll give you a headstart:
_ _ _ _ / O F F
Rolling Eyes
Re: A few questions [message #34505 is a reply to message #34438] Sun, 05 November 2006 17:40 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
After changing the .t files you need to rebuild the theme for the change to take effect.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Stuff in between forums?
Next Topic: Login Error
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 20:30:44 GMT 2024

Total time taken to generate the page: 0.03904 seconds