Topic: Guest access
All,
I have removed all options for Guest, I was wondering how I could go about getting a page just to have the login page and not show the forum title etc.
Have you got any ideas, or is this even possible.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 discussion → Guest access
All,
I have removed all options for Guest, I was wondering how I could go about getting a page just to have the login page and not show the forum title etc.
Have you got any ideas, or is this even possible.
Something like Wordpress?
Something like Wordpress?
Yes, that is perfect.
Now how does one go about achieving this, any ideas ?
This type of thing?
http://forums.bauchan.org/devforum/login.php
That is similar to the code over on the PunRes wiki:
http://wiki.punres.org/Add_a_login_form_over_the_header
If 1.2*, run something similar to that code between a header and footer include. If 1.3*, specifics on how to code it ain't my strong point, but the same principle applies.
This is as far as I could go with only making a 'login.tpl':
http://garciat.us.to/forums/login/
If you want your forum to look that way, let me know.
I have also managed to create an extension that forces guests to log in.
If you're interested, let me know.
This is as far as I could go with only making a 'login.tpl':
http://garciat.us.to/punbb/login.php
If you want your forum to look that way, let me know.
That great, how does one go about greating that?
With regard to the Guest login, I do not want any guest to be able to login/access the forum. This is one reason for the restricted first page.
Regards
Install this extension: http://garciat.us.to/code/punbb/small_login.zip
Thanks, how do you go about installing this add-on
Do you just upload them to the server, or is there a process I should follow. couldn't see anything on the extension forum.
Install this extension: http://garciat.us.to/code/punbb/extensi … _login.zip
Nice
But I would make it in another way.
No install and uninstall section, only 'hd_template_loaded' hook:
if (FORUM_PAGE == 'login')
$tpl_main =
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <!-- forum_local -->>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- forum_head -->
</head>
<body>
<div id="brd-wrap" class="brd">
<div <!-- forum_page -->>
<div class="hr"><hr /></div>
<div id="brd-main">
<!-- forum_main -->
</div>
<div class="hr"><hr /></div>
</div>
</div>
</body>
</html>
';
We avoid writting files and some other problems when extension is disabled (see http://fluxbb.org/wiki/developing_exten … e_disabled).
I don't know whether it will work or not, but looking at your code I think it should
Thanks, how do you go about installing this add-on
Do you just upload them to the server, or is there a process I should follow. couldn't see anything on the extension forum.
See instructions: http://punbb.informer.com/wiki/1.3_usag … _punbb_1.3
I just tried enabling/disabling it and it works
Thanks, how do you go about installing this add-on
Do you just upload them to the server, or is there a process I should follow. couldn't see anything on the extension forum.
Download the file
Unzip the file into your extensions folder (you should see the extension's folder there)
Go to Administration > Extensions
Install the extension
Enjoy
I just tried enabling/disabling it and it works
Ah, yes. It must work.
Sorry, I've a hard day
Was I right when I told about permissons for writting a file?
bach wrote:Thanks, how do you go about installing this add-on
Do you just upload them to the server, or is there a process I should follow. couldn't see anything on the extension forum.
Download the file
Unzip the file into your extensions folder (you should see the extension's folder there)
Go to Administration > Extensions
Install the extension
Enjoy
I have installed the extension and it works
What I was thinking is rather than having this for the login page can this be on the index page, so a user needs to login or register ?
So, you want to force all guests to login or register?
So, you want to force all guests to login or register?
Yeah,
First thing I want people to see is login or register. I was looking for some information on the coding just so I can understand it.
Cheers
I could make an extension (with turn on/off), or you could just add this to Line 23 on 'header.php':
if($forum_user['is_guest']) header("Location: ".forum_link($forum_url['login']));
I could make an extension (with turn on/off), or you could just add this to Line 23 on 'header.php':
if($forum_user['is_guest']) header("Location: ".forum_link($forum_url['login']));
Thanks for this, I think i'll add this code line into the header.php file. I may see if I can write an extension or this as it would be good practice. Do you know of any threads etc that could help me write an extension ?
Bach.
Sorry, I don't know of any links, BUT I learned extension coding with a blank extension template because it's self-explaining. Here you go:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">
<extension engine="1.0">
<id>Same as folder's name I.e.: pun_pm</id>
<title>Extension name</title>
<version>Extension version</version>
<description>Extension description</description>
<author>Your name</author>
<minversion>1.3</minversion>
<maxtestedon>1.3</maxtestedon>
<install>
<![CDATA[
//Code to run when installing
]]>
</install>
<uninstall>
<![CDATA[
//Code to run when uninstalling
]]>
</uninstall>
<hooks>
<hook id="hook_name">
<![CDATA[
//Code to run when forum script reaches hook
]]>
</hook>
</hooks>
</extension>
PunBB Forums → PunBB 1.2 discussion → Guest access
Powered by PunBB, supported by Informer Technologies, Inc.