Login     Sign up
adding a login form to a seperate page
gordie parham (@gordie)
Join date: Dec 21st 2010
Community posts: 3
View Profile
Send Message

I want to use Jcow as sort of an overlying member network for my website, which mean integrating it with my current website. I am relatively new to PHP and support for this application seems really hard to come by, even the smallest tip would be greatly appreciated.

I am basically trying to put a div on a page that I wrote to be sort of a gateway into my site. Said div would display a login form to guests or a greeting to a logged in member. I have spent the last 2 days reading and reading all the source trying to figure out what to do.. this is what I've come up with, and it simply does not work.

[code]
<? if ($client['id']) {
echo '<div class="usermenu"><p>Welcome back!</p>';
}
else {
echo '
<div class="usermenu">
<form method="post" name="loginform" id="form1" action="[url][/url">http://monztersquad.com/index.php?p=member/loginpost">[/url]
Login:
<input name="username" type="text">
Pass:
<input size="10" name="password" style="width: 120px;" type="password">
<input name="remember_me" value="1" type="checkbox"> Remember me<br>
<input id="logIn" type="submit" value="GO" >
</form>
</div>';
}?>
[/code]

Any help at all would be AMAZING... I'm pulling my hair out.

186 months ago
AL (@switch48)
Join date: Sep 1st 2010
Community posts: 450
View Profile
Send Message

Hi bit of a noob myself but this might help I just tested it and works mint if all you want is a login form somewhere on a page ...

[code]<div class="usermenu">
<form method="post" name="loginform" id="form1" action="[url][/url">http://monztersquad.com/index.php?p=member/loginpost">[/url]
Login:
<input name="username" type="text">
Pass:
<input size="10" name="password" style="width: 120px;" type="password">
<input name="remember_me" value="1" type="checkbox"> Remember me<br>
<input id="logIn" type="submit" value="GO" >
</form>
</div>[/code]

wow I just reread your post sorry mate if your looking for integration shes a hard road mate I havnt done myself but someone might have it involves database reconfig and a whole lot of stuff that just is way out of my league :)..

So good luck..

186 months ago
gordie parham (@gordie)
Join date: Dec 21st 2010
Community posts: 3
View Profile
Send Message

thanks buddy, I really appreciate your time. I mean I know it wouldn't be easy but I'm trying to start with the small things until I get familiar with the whole application. This is pretty much the determining factor of whether or not I purchase the pro version.. if the script can't do what I need it to I'm either gonna have to write one from scratch or find a simpler application with half the features...

Anyway, thanks again Switch. It seems like 90% of the advice on this forum is coming from you mate.

Anyone have any idea as far as what conditions I need to set in the statement?

186 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

if you write this in a module you need to change the echo to section_content or c

like section_content ('Hello World !')
c('Hello World !')

echo 'Hello world!' works only in your theme template files, otherwise Hello World! will show up somewhere on top of your page.

186 months ago