PDA

View Full Version : access to a blog from main website


Antony
04-19-2010, 07:42 PM
Hi folk. Im not really sure where else to put this so I'll give it a try here. Maybe someone can point me in the right direction if Im wrong.
The site Im building at present for my brother has one area which is for members only and so has to be logged into. From within this area my brother wants a blog.
The problem I have at the moment is that users also have to log into the blog area from the main site. Which for all practical reasons basically means logging in twice to get into the blog - once for the site and once for the blog.
My problem is twofold. (a) How can I get access to the blog from the main site without having to login a second time? while (b) maintaining the login if the users go directly to the blog without going onto the website first?
Is there anyway I can pass the login from the website Mysql database to the wp database? Im not sure what is the best way to achieve what I want - Im just presuming its possible.
Ive tried the Wordpress docs and forums but not getting any way forward with it. Someone did suggest maybe using .htaccess? Though I have no idea what I would put in it. The WP blog is currently in a seperate folder from the member only area if that helps info helps.

davidj
04-20-2010, 10:37 AM
You will need to look at the architecture of both systems and then crowbar one to pass info to the other. You may be able to handle access via cookies in both apps.

Its going to take a little bit of work and some technical know how to full fill your objective but its not impossible

Corrosive
04-20-2010, 10:54 AM
I managed to do something like this with Zencart and an add-on application we designed ourselves. I basically took the log-in function and session creation and replicated it in the app part we built.

It was fairly hard to get right but I got it working in the end.

Of course the second approach would be to build the whole thing based on one CMS platform. That might be easier to tie together.

Antony
04-20-2010, 12:23 PM
Corrosive. I presume you mean something like Joomla? I guess the learning continues :)

Corrosive
04-20-2010, 01:11 PM
Corrosive. I presume you mean something like Joomla? I guess the learning continues :)

Yep, pretty much. Joomla, Drupal, Modx... The list (and the learning) goes on. Just think what you'll be able to offer if you learn a decent CMS.

domedia
04-20-2010, 01:35 PM
Well he could just use the same approach with Wordpress, right?

Corrosive
04-20-2010, 01:43 PM
Well he could just use the same approach with Wordpress, right?

Potentially. I guess the issue comes when you want to have the blog restricted to log-in away from the public/static pages. I'm sure it could be done but just think that a CMS would be more flexible when it comes to this. Wordpress is set up to be a public blogging tool. Locking down the blog section kind of leaves you with nothing.

Just my thoughts anyway :)

cocoonfx
04-20-2010, 03:07 PM
Hi


I am currently doing this at the moment, you can use a html front end and then if your using wordpress you can simple call the wp-login.php file and then when you log in it should take you straight into wordpress. however I have not worked out the register and lost password bit.

Here is the hmtl part for the form.
<form action="/wordpress/wp-login.php" method="post" id="contactform">
<label for="name">Username<span class="red">*</span></label
<input id="name" name="log" class="text" />
<label for="user_password">Password <span class="red">*</span></label>
<input type="password" name="pwd" class="text" id="user_password" />
<input type="hidden" name="testcookie" value="1" />
<input name="rememberme" type="checkbox" id="rememberme" value="forever" /> Remember Me
<input name="wp-submit" type="image" class="send" id="wp-submit" src="images/send.gif (http://www.dreamweaverclub.com/forum/view-source:http://www.test-cocoonfxmedia.co.uk/goss/images/send.gif)" /><br/>
</form>
On another site I created my own theme and got round this but the site had to be in php.