| Author |
Message |
mikem
Theme Guru


Joined: Jan 13, 2003
Posts: 1582
Location: Corn fields of Indiana
|
Posted:
Fri Jan 17, 2003 11:00 am |
  |
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..
Now you see my headache
mikem |
|
|
   |
 |
ArtificialIntel

Joined: Jan 31, 2004
Posts: -88
|
Posted:
Fri Jan 17, 2003 12:21 pm |
  |
the default theme isn't in the users table, it's in the config table
ArtificialIntel |
|
|
   |
 |
mikem
Theme Guru


Joined: Jan 13, 2003
Posts: 1582
Location: Corn fields of Indiana
|
Posted:
Fri Jan 17, 2003 12:44 pm |
  |
| 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 |
|
|
   |
 |
IACOJ
Major


Joined: Jan 15, 2003
Posts: 1269
Location: USA
|
Posted:
Fri Jan 17, 2003 1:29 pm |
  |
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  |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Fri Jan 17, 2003 3:13 pm |
  |
Enabling it for nuke cops now, and checking it. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Fri Jan 17, 2003 3:34 pm |
  |
| 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] |
|
     |
 |
IACOJ
Major


Joined: Jan 15, 2003
Posts: 1269
Location: USA
|
Posted:
Fri Jan 17, 2003 3:47 pm |
  |
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. |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Fri Jan 17, 2003 4:19 pm |
  |
Default theme depends... you using Nuke's theme setting or phpBB2? |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
IACOJ
Major


Joined: Jan 15, 2003
Posts: 1269
Location: USA
|
Posted:
Fri Jan 17, 2003 4:57 pm |
  |
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 The previous link still works if you want to take a look at what I'm talking about. |
|
|
   |
 |
ArtificialIntel

Joined: Jan 31, 2004
Posts: -88
|
Posted:
Fri Jan 17, 2003 6:09 pm |
  |
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 |
|
|
   |
 |
IACOJ
Major


Joined: Jan 15, 2003
Posts: 1269
Location: USA
|
Posted:
Fri Jan 17, 2003 7:46 pm |
  |
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? |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Fri Jan 17, 2003 7:52 pm |
  |
Sure does... that's kind of how Your_Account | Theme menu works. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
IACOJ
Major


Joined: Jan 15, 2003
Posts: 1269
Location: USA
|
Posted:
Fri Jan 17, 2003 8:18 pm |
  |
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  |
|
|
   |
 |
ArtificialIntel

Joined: Jan 31, 2004
Posts: -88
|
Posted:
Sat Jan 18, 2003 4:22 am |
  |
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 |
|
|
   |
 |
IACOJ
Major


Joined: Jan 15, 2003
Posts: 1269
Location: USA
|
Posted:
Sat Jan 18, 2003 9:43 am |
  |
Thanks I'll try that.
I appreciate all your help and feedback. |
|
|
   |
 |
|
|