phpBB3 Website Integration Framework | Whizby Basic

Need some coding help with a MOD or tweak you are working on? - Ask here.
Forum rules
Ask for support specifically regarding coding help with phpBB3.
Not for generic usability questions or support.

Re: phpBB3 Website Integration Framework | Whizby Basic

Postby Kane » 30 Dec 2009, 02:35

I'm sorry for the double post but I couldn't edit.

Anyway, I tried this:
Code: Select all
$template->set_custom_template($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template');


But I forgot how to make $user->theme['template_path'] pull the users template id

All this trying to remember is making my head hurt. I'm probably not even making sense, and this is probably going to end up embarrassing me because it's so simple.

This doesn't even matter, that method would still make the framework pull the entire template system, including the overall_header.html etc from phpBB instead of the framework which defeats the entire purpose of this mod. -slapownface.

Ok. Taking a step back.

We need to pull ONLY CSS/Images from the forum's current default theme.
The template files need to be handled by framework so we can have our own special pages outside of the phpbb directory.
Why is this being difficult. :banghead:
I already died once. Let's hope it doesn't happen again.
User avatar
Kane    
Cadet II
Cadet II
 
Posts: 25
Joined: 27 Dec 2009, 21:15
Location: Texas
Favorite Team: Silver
Gender: Male
phpBB Knowledge: 5


Re: phpBB3 Website Integration Framework | Whizby Basic

Postby Kane » 30 Dec 2009, 03:17

Just tried this in website_class.php

Code: Select all
         'T_THEME_PATH'      => PHPBB_ROOT_PATH . 'styles/' . $user->theme['theme_path'] . '/theme',
         'T_TEMPLATE_PATH'      => SITE_ROOT . 'templates',
         'T_STYLESHEET_LINK'      => PHPBB_ROOT_PATH . 'styles/' . $user->theme['theme_path'] . '/theme/stylesheet.css',


Still no good. :banghead:
I already died once. Let's hope it doesn't happen again.
User avatar
Kane    
Cadet II
Cadet II
 
Posts: 25
Joined: 27 Dec 2009, 21:15
Location: Texas
Favorite Team: Silver
Gender: Male
phpBB Knowledge: 5

Re: phpBB3 Website Integration Framework | Whizby Basic

Postby Kane » 30 Dec 2009, 07:26

Ok so as it stands I'm hoping to find someone in the community who knows what it would take to be able to do this:

Force the framework to use the /theme folder from whatever style the forum was using but not use it's /template folder.

The idea is for the website to switch styles automatically as they are switched on the forum.

I know I could just copy/paste the "/theme/images" and whatever changes were made to the css, but there has to be a more dynamic solution.

My previous post has what I tried and was probably the closest I could get, but for whatever reason, it's not recognizing "$user->theme['theme_path']". I'm sure it has something to do with not including the right file in the right place, but that's beyond my php knowledge. I'm a style designer...


.....

@ HoL

I also noticed that {T_THEME_PATH} wouldn't work in a .css file that was outside of phpBB3 directory and you changed all the image links from;
Code: Select all
url("{T_THEME_PATH}/images/bg_list.gif")

to
Code: Select all
url("./images/bg_list.gif")


Was there no way to preserve being able to use {T_THEME_PATH}?
I already died once. Let's hope it doesn't happen again.
User avatar
Kane    
Cadet II
Cadet II
 
Posts: 25
Joined: 27 Dec 2009, 21:15
Location: Texas
Favorite Team: Silver
Gender: Male
phpBB Knowledge: 5

Re: phpBB3 Website Integration Framework | Whizby Basic

Postby Highway of Life » 30 Dec 2009, 15:48

Okay, hold up a minute, I’m going to dive into the code (been a while) and see if I can figure out what you need and what you should do.
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: phpBB3 Website Integration Framework | Whizby Basic

Postby Kane » 30 Dec 2009, 16:47

var_dump($user->theme['theme_path']); results in NULL

(I wish I could just edit)
I already died once. Let's hope it doesn't happen again.
User avatar
Kane    
Cadet II
Cadet II
 
Posts: 25
Joined: 27 Dec 2009, 21:15
Location: Texas
Favorite Team: Silver
Gender: Male
phpBB Knowledge: 5

Re: phpBB3 Website Integration Framework | Whizby Basic

Postby Highway of Life » 30 Dec 2009, 17:12

Okay, that means that either $user is not being defined (globalized), or the session is not being called.

(I wish I could just edit)
What do you mean by that? :confused:
You can edit whatever you need to. :) -- If you think something needs to be changed, submit a patch and I’ll incorporate it.
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: phpBB3 Website Integration Framework | Whizby Basic

Postby Kane » 30 Dec 2009, 17:23

Highway of Life wrote:Okay, that means that either $user is not being defined (globalized), or the session is not being called.

(I wish I could just edit)
What do you mean by that? :confused:
You can edit whatever you need to. :) -- If you think something needs to be changed, submit a patch and I’ll incorporate it.


No I meant edit my posts, I feel like I'm being an [*donkey*] when I have to make a whole new post for a small update, I don't mean to make so many posts back to back.

Anyway, I just tested with var_dump($user->data['username']); which output string(4) "Kane" so.. :scratch:
I already died once. Let's hope it doesn't happen again.
User avatar
Kane    
Cadet II
Cadet II
 
Posts: 25
Joined: 27 Dec 2009, 21:15
Location: Texas
Favorite Team: Silver
Gender: Male
phpBB Knowledge: 5

Re: phpBB3 Website Integration Framework | Whizby Basic

Postby Kane » 30 Dec 2009, 17:59

I just thought of something, would this be happening if register_globals was off? I'm using wampserver 2.0 for all this testing.

Edit: Never mind, stupid question. Obviously we're not using $_GET, $_POST etc..
I already died once. Let's hope it doesn't happen again.
User avatar
Kane    
Cadet II
Cadet II
 
Posts: 25
Joined: 27 Dec 2009, 21:15
Location: Texas
Favorite Team: Silver
Gender: Male
phpBB Knowledge: 5

Re: phpBB3 Website Integration Framework | Whizby Basic

Postby Kane » 30 Dec 2009, 20:08

I just thought of and tried this as well, with no luck

Code: Select all
T_THEME_PATH'      => (!$user->theme['theme_storedb']) ? "{$php_root_path}styles/" . $user->theme['template_path'] . '/theme' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->data['user_lang']),
I already died once. Let's hope it doesn't happen again.
User avatar
Kane    
Cadet II
Cadet II
 
Posts: 25
Joined: 27 Dec 2009, 21:15
Location: Texas
Favorite Team: Silver
Gender: Male
phpBB Knowledge: 5

Re: phpBB3 Website Integration Framework | Whizby Basic

Postby mtotheikle » 31 Dec 2009, 03:57

I think if you remove
Code: Select all
$template->set_custom_template(SITE_ROOT . SITE_TEMPLATE_PATH, SITE_TEMPLATE_NAME);


from common.php it will use the default phpBB3 users style path.
"You have a lifetime to learn technique. But I can teach you what is more important than technique: How to see. Learn that and all you have to do afterwards is press the shutter." - Garry Winogrand

I have turned into a Military Sergeant and Highway of Life and Handyman are my newest privates under my command. Don't be scared anyone, this is all for your good!

Image
User avatar
mtotheikle    
Supporter
Supporter
 
Posts: 1054
Joined: 10 Oct 2007, 22:43
Location: Washington
Favorite Team: Seahawks
Gender: Male
phpBB Knowledge: 10

PreviousNext

Return to phpBB3 Coding Assistance

Who is online

Users browsing this forum: Discovery Bot, Majestic-12 [Bot] and 17 guests