PDA

View Full Version : [fixed] making a unique style for an individual forum show up for unregistered users


JonnyQuest
Mon 4th Jun '01, 4:55pm
I have created a new style that I would like to implement on an single forum. I set the forum to use that style. When a user is logged in, they see the correct style, however, an unregistered, (or not logged in) user still sees the default.
Any help here?

Mike Sullivan
Mon 4th Jun '01, 5:11pm
Set the "style override" part to yes and see if that helps.

JonnyQuest
Mon 4th Jun '01, 5:44pm
That works, however, that blows up my cobranding for both registered and unregistered users.
Seems odd that it would work for registered and not for unregistered - almost makes me think its a bug

JonnyQuest
Tue 5th Jun '01, 10:42am
Can anyone tell me how to make it so that it is the same for registered and unregistered users?

Mike Sullivan
Tue 5th Jun '01, 12:51pm
In global.php, replace:

if ($getforum[styleoverride]==1 or $bbuserinfo[styleid]==1) {

with this:

if ($getforum['styleoverride']==1 or $bbuserinfo['styleid']<2) {

All 3 times it appears and see if that fixes it.

JonnyQuest
Tue 5th Jun '01, 1:19pm
That appears to have worked.
Once again Ed, you rock.
From looking at your code, it appears as though you've made it so that the default template (styleid=1) is allowed to have forums with individual styles? If this is true, I take it that I couldn't make a cobrand with individuatl styles for a forum. If so, it seems to me that there needs to be a bit of reworking in how styles and templates work. It almost seems that a style needs to be a group of templates. I know there has been a lot of talk about how cobranding and templates work and this seems like another example of our problems.
To be honest, making specific templates for an individual forum is only important for me when it comes to targeting ads to that forum. I know I have posted many times looking to be able to pull the forum title (or something forum specific) into the header for inclusion in the ad tag. If this were possible, it would be a piece of cake to serve targeted ads in a specific forum without having to create a custom template.
Thanks again!

Mike Sullivan
Tue 5th Jun '01, 1:40pm
From looking at your code, it appears as though you've made it so that the default template (styleid=1) is allowed to have forums with individual styles? Actually the issue was that unregistered users were getting styleid=0 (which really =1 anyway), but wasn't accounted for.

If they have styleid 1 then they're using the original style (not co-branded), and custom styles per forum automatically overrid that. If they have a styleid>1 (non-default), then their current styleid overrides the forum's, unless the forum has a style override set.

If this is true, I take it that I couldn't make a cobrand with individuatl styles for a forum.Correct. Without hacking that is.

It's not that hard, but it gets tedious if you want the style to appear in 27 of your 32 forums on cobranded style A, C, and D, but not B. (</overly-complex-example>)

JonnyQuest
Tue 5th Jun '01, 1:54pm
That makes sense.
One other quick question:
Every user in my board has a styleid of 1, regardless of whether they registered from the default style or from a cobrand. Is this correct? Should they not have the styelid of the style they registered from?