PhpBB 3 portals

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Locked
Ectoman
Registered User
Posts: 192
Joined: Sat Dec 15, 2001 3:53 pm
Location: Denver CO
Contact:

Re: PhpBB 3 portals

Post by Ectoman »

EXreaction wrote: But otherwise, yes, you can use:

Code: Select all

if ($this->data['user_id'] != ANONYMOUS)
To check if they are logged in. :)


Thanks.. I already had the rest of the code.

Just wanted to double check to make sure there wasn't a different way.

User avatar
Acyd Burn
Posts: 1838
Joined: Tue Oct 08, 2002 5:18 pm
Location: Behind You
Contact:

Re: PhpBB 3 portals

Post by Acyd Burn »

Be cautious in assuming that it is a registered user, bots are having a valid user id too. ;)

To check if it is a real logged in user i would use:

Code: Select all

if ($user->data['is_registered'])
{
}
To check if it is a search robot/crawler:

Code: Select all

if ($user->data['is_bot'])
{
}

Image

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: PhpBB 3 portals

Post by EXreaction »

Nice. :)

Ectoman
Registered User
Posts: 192
Joined: Sat Dec 15, 2001 3:53 pm
Location: Denver CO
Contact:

Re: PhpBB 3 portals

Post by Ectoman »

I had come across that code as well, so I was wondering what would be better.

I see Olympus using the != ANONYMOUS more than the is_registered.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: PhpBB 3 portals

Post by EXreaction »

Ectoman wrote: I had come across that code as well, so I was wondering what would be better.

I see Olympus using the != ANONYMOUS more than the is_registered.


Depends on what you are using it for. ;)

!= ANONYMOUS would be for checking if they are logged in(including bots).
is_registered would be to check if they are logged in and they are not a bot. :)

Omnidon
Posts: 5
Joined: Wed Aug 16, 2006 7:23 am

Re: PhpBB 3 portals

Post by Omnidon »

phpBB makes a great portal ;-)
I've made a different custom web portal based on phpBB for nearly all of my many sites. It's very easy to mod for phpBB.

Ectoman
Registered User
Posts: 192
Joined: Sat Dec 15, 2001 3:53 pm
Location: Denver CO
Contact:

Re: PhpBB 3 portals

Post by Ectoman »

EXreaction wrote: Depends on what you are using it for. ;)

!= ANONYMOUS would be for checking if they are logged in(including bots).
is_registered would be to check if they are logged in and they are not a bot. :)


In my case it will always be the is_registered.

I have just now come to an interesting idea... if the user on the site is a bot, it will recieve a custom page without any styling or anything. Pure content without all the flashy images and graphics. That should help with my PR... (and I am talking doing this outside of the forums).. on 'portal' pages only, which is every other page on my site.

Aden
Registered User
Posts: 29
Joined: Sun Sep 17, 2006 8:17 am

Re: PhpBB 3 portals

Post by Aden »

I also have a portal in progress.
[spam]

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: PhpBB 3 portals

Post by EXreaction »

Aden wrote: I also have a portal in progress.
[spam]


The Who is online looks weird on the left. :P

And that left panel looks somewhat similar to the one I put in at my other forums. :mrgreen:

Michaelo
Registered User
Posts: 106
Joined: Thu Apr 01, 2004 7:56 am
Location: Dublin

Re: PhpBB 3 portals

Post by Michaelo »

As discussion relating to portal is not officially sanctioned I will take the time to introduce the Kiss Portal, the whys where’s and whatnots…

My original thoughts when I started the development on the Kiss Portal were as its name implies to ‘Keep it Simple and Smart’ (a small change to the more familiar acronym)… The original ‘Keep it Simple Stupid’ was dropped as I could not find anything ‘stupid’ about it…

My strategy and as a consequence the restraints I imposed were:
  • Never modify core code unless absolutely necessary ... (* see below)
    Always use existing core code where possible (don't reinvent the wheel)...
    Never complicate code to the point where no one can follow it...
    Use a modular approach to modifications and portal blocks...
    Allow sufficient leeway in order to support different theme designs to alter the look and feel of a board. (If a template/theme design doesn’t contain the required file to display a portal block it doesn’t break the page… it is simply skipped).
*Note: If core code had to be modified I did it in such a way as to ensure SVN update did not result in errors. How many times have you tried to follow a mod install only to find the text in 'Find xxx' was either missing or previously modified, at best this made things difficult but more often impossible...

Background:
Kiss was started a week or so after phpBB3 CVS became available and so is the first portal for phpBB3. Admittedly I got a little stick for developing based on pre beta but once I realised discussion was forbidden I soon learned to develop quietly, don't bug people and use the time to familiarise myself with the code. The portal code was written from the ground up and up to recently only contained my own code, however, with the support from the guys at startrekguide I have included several of their mods and a few new mods of my own…

Editing core code, my method:

In php code I use if (KISS_INSTALLED) do {i} else {j}. The original code would be in {j} and my alterations were in {i}... The SVN would update the code in {j} and I would examine the updates and make any alterations to my code {i} where necessary... In templates I use <!-- IF KISS --> {i} <!-- ELSE --> {j} <!-- ENDIF -->...
I note with this method it is entirely possible to disable the portal/portal code should a problem exist and the system reverts back to a default installation of phpBB3.

If you want to see it in action, join in and support it, or even criticise it, drop by… see sig for link. My thanks to everyone who has supported the portal, it may not amount to anything but it’s been worth the effort and by the way… I don’t even have a news section; all the portal page threads are pulled from the announcements forum…

Special thanks to Highway and the guys at startrekguide.

Mike
Mods: Forum Icons Enhancement, Kiss Portal Engine
Links:
Kiss Portal Engine (dev site) Stargate Portal (archive site) ...
Styles: Technika

Locked