Need some php assitance with my 1st ever mod

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
User avatar
pobz
Registered User
Posts: 42
Joined: Wed Mar 20, 2002 6:16 pm
Location: UK
Contact:

Need some php assitance with my 1st ever mod

Post by pobz » Thu Oct 03, 2002 12:00 pm

http://www.carnforthrufc.co.uk/phpBB2

I need some help with the above site as my php knowledge is minimal.

I took somebody elses mod for a guest pop up, that would check for guests and pop up a window asking them to register.

I didn`t like the look of it and decided to make my own, whilst addresing some of the problems of the original one.

I made mine include the layout of sub silver so it blended in better.
I only made it pop up on the index page not on every window refresh.
I made it close the popup when the option was selected and it re-directs the main window to either registration or forgotton password.

My problem is if you actually have a login username and password you cant seem to enter it in the popup, i assume it needs to point at a certain item, but i dont know what.

Any help would be appriciated as when i`m finished i will put it up for the mod database as i think its a worthwhile mod.

PoBz
Last edited by pobz on Thu Oct 03, 2002 2:16 pm, edited 3 times in total.

User avatar
smithy_dll
Former Team Member
Posts: 7630
Joined: Tue Jan 08, 2002 6:27 am
Location: Australia
Name: Lachlan Smith
Contact:

Post by smithy_dll » Thu Oct 03, 2002 12:08 pm

Hi,

I moved your thread to a more appropriate forum, a forum where mod authors can talk about their mods and get help and live happily in a world of peace where they don't have to worry about the hassle that the mod category is facing... Sorry for rambling on, good luck with getting help for your mod and hope to see it in the mod DB

don't forget to use the OFFICIAL mod template ;).

User avatar
pobz
Registered User
Posts: 42
Joined: Wed Mar 20, 2002 6:16 pm
Location: UK
Contact:

Post by pobz » Thu Oct 03, 2002 12:11 pm

No problem, wasn`t sure where to post.

PS Allready done the mod template :D
Last edited by pobz on Thu Oct 03, 2002 12:36 pm, edited 1 time in total.

Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Post by Acyd Burn » Thu Oct 03, 2002 12:35 pm

You have forgotten the form-tag. The Data have to be submitted of course. :)

Look at the login_body.tpl file for an example.

User avatar
pobz
Registered User
Posts: 42
Joined: Wed Mar 20, 2002 6:16 pm
Location: UK
Contact:

Post by pobz » Thu Oct 03, 2002 12:38 pm

<form> tags now in but still not re directing on login.

Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Post by Acyd Burn » Thu Oct 03, 2002 12:51 pm

The {S_LOGIN_ACTION} is not resolved, are u using a tpl-file for the popup ? I hope so. :)

And please close the form tag after the last closing table tag.

User avatar
pobz
Registered User
Posts: 42
Joined: Wed Mar 20, 2002 6:16 pm
Location: UK
Contact:

Post by pobz » Thu Oct 03, 2002 12:55 pm

form tag is now closed (i was sure i`d already done that :oops: )

the popup is a .tpl

does the {S_LOGIN_ACTION} need replacing with something else?

Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Post by Acyd Burn » Thu Oct 03, 2002 1:08 pm

have to be login.php.

Code: Select all

	'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx),

User avatar
pobz
Registered User
Posts: 42
Joined: Wed Mar 20, 2002 6:16 pm
Location: UK
Contact:

Post by pobz » Thu Oct 03, 2002 1:22 pm

sorted that now but after you enter your details it sends you to the login page to enter them again.

Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Post by Acyd Burn » Thu Oct 03, 2002 1:45 pm

Maybe the POST Vars got not submitted to the parent URL ? (login.php)

Don't know, but the html-source looks good. (password, username and login field all correct.)

User avatar
pobz
Registered User
Posts: 42
Joined: Wed Mar 20, 2002 6:16 pm
Location: UK
Contact:

Post by pobz » Thu Oct 03, 2002 1:50 pm

So close yet so far, thanks for your help Acyd Burn,

I have put you in the thankyou part of the readme file for when its eventually finished.

User avatar
pobz
Registered User
Posts: 42
Joined: Wed Mar 20, 2002 6:16 pm
Location: UK
Contact:

Post by pobz » Thu Oct 03, 2002 9:27 pm

Right the basic mod now works (ish)

But i still need to get the username / passowrd / autolog information out of the popup and into the login.php then redirect to index.php.

Any ideas?

DJ P@CkMaN
Registered User
Posts: 194
Joined: Thu Jun 06, 2002 12:55 am
Location: Brisbane, Australia
Contact:

Post by DJ P@CkMaN » Fri Oct 04, 2002 3:18 am

Just a quick note on something that could help you. login.php automatically redirects to the forum index, but you can change that by adding a hidden field in the login form like this -

Code: Select all

<input type='hidden' name='redirect' value='your-page.php' />

User avatar
pobz
Registered User
Posts: 42
Joined: Wed Mar 20, 2002 6:16 pm
Location: UK
Contact:

Post by pobz » Fri Oct 04, 2002 7:04 am

cheers i`ve already done that on the pop up, but afetr filling the details in rather than take you to the hidden redirect, it takes you to login.php which is in the form action= tag. Which means you have to fill in your details again.

User avatar
pobz
Registered User
Posts: 42
Joined: Wed Mar 20, 2002 6:16 pm
Location: UK
Contact:

Post by pobz » Fri Oct 04, 2002 9:22 am

I have got the username & passwords working now, but the last problem is that i cant get the login button to close the popup and redirect the main page.

I have managed to get the forgotton password and register links but the login button is different.

Can anyone assist?

Post Reply

Return to “[2.0.x] MOD Writers Discussion”