You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 63 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - automatic theme recognition, in forum block [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Fri Jan 17, 2003 11:00 am Reply with quoteBack to top

Well, if you are shooting for the same method I tried. I went this way.

For the image paths in the block file.
I was trying to query Default_Theme from the users table. Then simply did this for all the image links

change
Code:
background=\"modules/Forums/templates/DarkBlue/images/barpic3.gif\


to
Code:
background=\"$Default_Theme/images/barpic3.gif\


but I never got it to work. I realyl don't think it is possible. It needs to actually try and grab the css style and image paths from the Forum template since that is what it is geared more towards.. Confused

Now you see my headache Smile

mikem
Find all posts by mikemView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Fri Jan 17, 2003 12:21 pm Reply with quoteBack to top

the default theme isn't in the users table, it's in the config table

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Fri Jan 17, 2003 12:44 pm Reply with quoteBack to top

ArtificialIntel wrote:
the default theme isn't in the users table, it's in the config table

ArtificialIntel


right..that would be a fauxpas on my part..hehe
Find all posts by mikemView user's profileSend private message
IACOJ
Major
Major


Joined: Jan 15, 2003
Posts: 1269

Location: USA

PostPosted: Fri Jan 17, 2003 1:29 pm Reply with quoteBack to top

I uploaded it

{edit} I checked the config table though, I couldn't find a reference to the default theme. Thats why I went into _bbthemes.

I clicked on the file after I uploaded (cool feature btw) and it says there is a parse error on line on line 29. It didn't show up on my site, and I"ve been messing with it a bit through my cp there, so I'm going to check to make sure what you have is actually what's up there. The only thing I can think of giving the parse is that there are two ) at the end of the line instead of );

If there is a difference between what I sent and what's up, I'll resend the correct one.

{edit 2nd time} I uploaded the right on, deleted the other. Now it says there is a fatal error when I click it. It doesn't show that on my page Confused
Find all posts by IACOJView user's profileSend private message
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Fri Jan 17, 2003 3:13 pm Reply with quoteBack to top

Enabling it for nuke cops now, and checking it.

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Fri Jan 17, 2003 3:34 pm Reply with quoteBack to top

IACOJ wrote:
I'm trying to come up with a way for a forum block to recognise the default theme of the users.
Ok, as you can see I've cleaned up the code so it looks better on the page, now onto the question of the default user theme. You want the block to display in the default theme of the user browsing the site?

When a user is on the site, they are already using their default theme setting, so the block will show up already just fine.

Am I missing something?

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
IACOJ
Major
Major


Joined: Jan 15, 2003
Posts: 1269

Location: USA

PostPosted: Fri Jan 17, 2003 3:47 pm Reply with quoteBack to top

Your default theme would be subsilver, the block doesn't come up in those colors. I sent you another file, cause I have it doing something different now. (I think I sent the wrong one the second time anyway. Sorry about that, too many working copies)

I want it to work so that anon will see Nuke/phpbb default, as soon as a user signs in, if they are using another theme it will switch to their chosen theme.
Find all posts by IACOJView user's profileSend private message
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Fri Jan 17, 2003 4:19 pm Reply with quoteBack to top

Default theme depends... you using Nuke's theme setting or phpBB2?

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
IACOJ
Major
Major


Joined: Jan 15, 2003
Posts: 1269

Location: USA

PostPosted: Fri Jan 17, 2003 4:57 pm Reply with quoteBack to top

I'm trying to use phpbb so that the cells come out the same as they look in the forum.

I actually tried adding nearly everything in the db in that sql line, and have now taken it out completely, and it doesn't make any difference to the appearance at all.

Then I replaced it with this
Code:
$result = sql_query ( "SELECT user_theme FROM ".$prefix."_users where uid='$user_theme'", $dbi);
list($user_theme)=sql_fetch_row($result, $dbi);


Still doesn't make any difference, the whole box is black. The problem is not all the image files are named the same thing for each template. It depends who created it. Maybe the gifs used for each row will have to be defined and given a variable or somthing.

I don't know, I hate tables

EDIT BWAAAHAHAHAHA... we have progress, we have near success! I'm very excited about it. Should be finished tonight I think Very Happy The previous link still works if you want to take a look at what I'm talking about.
Find all posts by IACOJView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Fri Jan 17, 2003 6:09 pm Reply with quoteBack to top

if you're after the default theme - WHY ARE YOU LOOKING IN THE USERS TABLE??????????

The default theme for nuke is sored in the _config table in the field "Default_Theme"

The default theme in phpBB is stored in the _bbconfig table in the same field.

If you're looking for the users current theme, then why not copy the code streight from the Your_Account module themes function? It looks up the theme you're using so it can display it in the drop down box when the page loads.

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
IACOJ
Major
Major


Joined: Jan 15, 2003
Posts: 1269

Location: USA

PostPosted: Fri Jan 17, 2003 7:46 pm Reply with quoteBack to top

I went into the the user table because I want the user preferences, not just the board defaults. I'm trying to make it work so if you have more then one theme, the script will default to the user preferences rather then Nuke or the board default. Does that make sense?
Find all posts by IACOJView user's profileSend private message
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Fri Jan 17, 2003 7:52 pm Reply with quoteBack to top

Sure does... that's kind of how Your_Account | Theme menu works.

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
IACOJ
Major
Major


Joined: Jan 15, 2003
Posts: 1269

Location: USA

PostPosted: Fri Jan 17, 2003 8:18 pm Reply with quoteBack to top

I understand that, I tried putting it in there, I got back errors, and when I corrected, I got back more errors.

I don't know if I put it in the wrong place or what the problem was.

At one point I actually had the block showing PART of the correct colors. Changed it, and now can't get it back there again Confused
Find all posts by IACOJView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Sat Jan 18, 2003 4:22 am Reply with quoteBack to top

have you checked to make sure that the block's not calling functions that are only in the Your_Account module? If so, you'll need to copy them too

[edit]

Also, put a cookie decode in there, it's where the site stores the users theme once they're logged in.

[/edit]

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
IACOJ
Major
Major


Joined: Jan 15, 2003
Posts: 1269

Location: USA

PostPosted: Sat Jan 18, 2003 9:43 am Reply with quoteBack to top

Thanks I'll try that.

I appreciate all your help and feedback.
Find all posts by IACOJView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 1.004 Seconds - 321 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::