UBB.Dev
Posted By: JoshPet Multiple Home pages - 10/04/2002 4:34 AM
Community Zero (provider to many free discussion boards) has told these groups to either "pay up" or "get out".

They are offering the board owner the option to buy x number of page views... or users can pay like $30 to browse groups.

Anyway, we've invited a couple of now "homeless" support forums from Community Zero to join our site.

I would like to set them up their own home page.... sorta a hacked customized IIP.

I've set up one at www.measurection.com/mma2om

But the trouble is...that it redirects to measurection.com/mma2om (without the www) which causes cookie issues.

Is that an IIP thing or a server thing.... I'd like it to keep the www.

There used to be a "redirect script" somewhere here for the header which made sure the www was always used....

I think this is the post... but it either no longer exists or I don't have access to it.

Any ideas?
Posted By: JustDave Re: Multiple Home pages - 10/04/2002 4:45 AM
I am not aware of anything that would strip the configured url out... are you speaking of the menu box? I see that the www. is missing compared to the other links on the page.

I'll look things over and see what's up.

I also have a few ideas that will help you seperate this more. I'll jot them down and send them your way.
Posted By: JoshPet Re: Multiple Home pages - 10/04/2002 4:48 AM
Thanks.

You know it works fine if I put the index.php in the url... so I guess it's a server setting somewhere.

I will ask rackspace.

I've tweaked/hacked a few of the pals in there to only pull stuff from that particular forum.... yet, let others like shoutbox etc.. be common to all pages.

Thanks for the help.
Posted By: Ian_W Re: Multiple Home pages - 10/04/2002 7:05 PM
Yep - it is down to how your zone files / your server is set up for the account.

What do you have as the host name set to for the account - that should be www with the domain name set to measurection.com.

You have a very similar set up to me, I have some 20odd indexpages - all running IIP - I did not need to alter any of the pals, or duplicate them - apart from creating a duplicate copy of editconfigpal and doeditconfigpal - renaming them by adding the directory name after them.

However, I have discovered what the biggest complaint of my users is....

They can't tell when a thread has new posts - if you find a way round this please tell me. Currently with your new groups if you display 'current threads' it will display current threads from site wide - rather than say the news forums, which both you and I have decide to display for our small communities.

The only indication is the number of replies, and no one would ever be able to remember how many replies a thread had ealier.

Of course to compound matters, the threads displayed as news items, are the most recent started threads - not the most recently posted to threads.

Any thoughts would be welcome....

Ian

Posted By: JoshPet Re: Multiple Home pages - 10/04/2002 7:56 PM
I hacked mine to use their own set of Pals.... then in the current threads and top threads pal I hacked in an AND B_Board = 'theboardkeyword' so that those pals only pulled from those boards.

Something to highlight them on those pals when they are new would be cool. I know Dave is thinking about the queries though....and of course that wouldn't work if you were caching the page.
Posted By: JustDave Re: Multiple Home pages - 10/04/2002 8:09 PM
It would definately slow things down to do what ubbthreads.php does and check what is new against the user's data. Perhaps having another field in the users table that sets a time stamp each time the pals are displayed and when running through the threads/posts if the related time stamp is newer than the viewers add a "new" tag to it. Since we already authenticate the viewer we only need to add one more query per IIP page to put a time stamp into this new field for the user.

I have thought about doing this for a few other things I been kicking around.

Thoughts?
Posted By: Ian_W Re: Multiple Home pages - 10/04/2002 9:44 PM
Could we not have a last post type message - along the bottom the news box.

Last post by fred at 6.30pm

Posted By: Ian_W Re: Multiple Home pages - 10/04/2002 9:49 PM
It is very hard to type when listening to Queen - Bohemiam Rhapsody

Josh/Dave - if I were to add a second copy of the current threads & top threads pal - what alteration would I need to do to fit it in with the forums in question - ideally the option to have more than one forum - and if one of those were private those posts obviously should not display.

Thanks in advance for any tips.
Posted By: JustDave Re: Multiple Home pages - 10/04/2002 10:03 PM
The problem is that we are using cache. Ideally we should use cache as much as possible as this helps speed things up. If we have to look for who posted last we may as well grab all of the new posts. Then there is no point to caching this information.

I will look into displaying "last post by" when the option "force public" is not used since we wont be caching any information. This of course will be an option. This isn't something that will be high on my list of to do's though. I have a ton of things I'm trying to blend and smooth out... lol

So this "last post by" is for the news section?
Posted By: JoshPet Re: Multiple Home pages - 10/04/2002 10:09 PM
I [:"red"]L O V E [/] Queen!!!

Bohemiam Rhapsody is my favorite. I think I'm gonna have to put that on here in the office while I type this.

I made a directory on my site.... for example "mma2om" and put an IIP index page and a pals folder in there.

Then in that directories index.php file... I modified this:

For
$palspath = "/home/measurection/htdocs/mma2om";
I made this the path to this new special directory INSTEAD of my threads install

Then I added this:
$threadspath = "/home/measurection/htdocs/forums";

which is the path to my real threads install.

Then I changed this:
include "{$palspath}/main.inc.php";

to:
include "{$threadspath}/main.inc.php";


Then in currentthreadspal.php I found this:
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Main,B_Replies,B_Counter,B_Board
FROM {$config['tbprefix']}Posts
WHERE B_Number = B_Main
AND B_Posted > '$date'
AND B_Approved = 'yes'

and added:
AND B_Board = 'mma2om'

to it. *mma2om" is the board keyword I wanted to limit it to.


Same things in topthreadspal.php
Find this:
SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Main,B_Replies,B_Counter,B_Board
FROM {$config['tbprefix']}Posts
WHERE B_Number = B_Main
AND B_Last_Post > '$date'
AND B_Approved = 'yes'

add this:
AND B_Board = 'mma2om'



I didn't fool with making the online config editor work. I think there's another path change needed to make it work and update. I didn't play with it much, I edited the configpal manually for this directory.

If you were doing a bunch of these.... I guess you could define a board keyword variable in the config pal, then call it in the pal scripts for B_Board. I didn't get that fancy. Mine was down and dirty, and quick.

Hope that helps.
Posted By: Ian_W Re: Multiple Home pages - 10/04/2002 10:25 PM
Thanks.

So if I wanted to select more than one board would I use..

AND (B_Board = 'board1' AND B_Board = 'board2' AND B_Board = 'board3' )

Ian
Posted By: JoshPet Re: Multiple Home pages - 10/04/2002 10:36 PM
Hmmmm.....

I'm not the SQL expert. I fear something like that would make it that all those keywords had to be met for it to grab posts.

I'm thinking we might need something more like an OR statement.
I'm not sure... but I bet one of our SQL whizzes will happen by and know how we can grab all posts from xxxxx and yyyy keyword.

Posted By: JustDave Re: Multiple Home pages - 10/04/2002 10:53 PM
Use OR for more than one board. Also, keep in mind that this will display to everyone, even those that don't have access to them boards.
Posted By: Ian_W Re: Multiple Home pages - 10/04/2002 11:08 PM
[]Also, keep in mind that this will display to everyone, even those that don't have access to them boards [/]

Drat

Okay but if I limit it to public boards then I would use...

AND (B_Board = 'board1' OR B_Board = 'board2' OR B_Board = 'board3' )

Posted By: JustDave Re: Multiple Home pages - 10/04/2002 11:19 PM
[]
Okay but if I limit it to public boards then I would use...

AND (B_Board = 'board1' OR B_Board = 'board2' OR B_Board = 'board3' )
[/]

That is correct.
Posted By: Organizer Re: Multiple Home pages - 10/20/2002 1:57 AM
I want to run my main site with normal forum, then two subsites using the same forum, the IIP and all with their own designs/colors...

Does anybody have another way than JosPets to get this working as smooth as possible, or any other suggestions on how to make this work.

How to change the layout and so on the easy way for the subsites? When entering through one subsite the forum should preferably have one design thorught all the visit, and another one for the other subsite... is that possible or would only the main IIP index have the new deisng and when entering the forum it will be the forums design?
© UBB.Developers