Page 2 of 3

Re: Prospace

Posted: Tue Apr 20, 2010 11:20 am
by Jackson
Ok, that issue was resolved by fixing the width of the over all site. Perhaps not a solution for everyone, but it worked for my application..

So now I have another question for you...

phpbb3 alternates shading for the rows for ease of reading, but I imagine that the shading color is defined by the style. I'd like to fix this at one color, in my case black. Seems it's probably easier to find where these shades are defined in the skin, and set them both to the same thing?

Can you tell me where in to prospace style these settings are defined? Or is there a better way to approach that?

Re: Prospace

Posted: Tue Apr 20, 2010 5:23 pm
by spaceace
background colours are controlled in the colours.css
Code: Select all
.bg1	{ background-color: #000000; border-top: 1px solid #620D0D; border-bottom: 1px solid #620D0D; }
.bg2	{ background-color: #111111; border-top: 1px solid #620D0D; border-bottom: 1px solid #620D0D; }
.bg3	{ background-color: #000000; }

Re: Prospace

Posted: Mon May 03, 2010 12:35 pm
by Jackson
Hey Spaceace .. Got a question for you.. not specifically a style question, more of a hybrid..

Actually two related questions..

Say I am wanting to run a Include php statement in the template.. I already have such a thing running as a ad row header..

Is it possible, to pull a user name out of phpbb3 to include with said include directive? and if so, how?

1) I'd like to pull currently logged in user name and send that name to an external script ...

2) I'd like to pull a user name from, for example, from the profile area. The user name belonging to whoever's profile you are in, also with the intention to send that name to an external script.

-----------------

These are probably more phpbb3 functional questions than style questions, but since the directive will be in the style templates, I thought you might be able to provide me with some insight on these abilities.

Re: Prospace

Posted: Mon May 03, 2010 1:56 pm
by spaceace
could you give an example of the external script? like is it something that will be within phpBB? or will it be a script going to another platform?

also, there are mods like a welcome mod that welcomes you when you log in with your username in a welcome box. you might be able to pull the code from a mod like that and use it where you want it.

Re: Prospace

Posted: Mon May 03, 2010 3:29 pm
by Jackson
Nothing too fancy..

Straight forward call to a php script - not in phpbb such as this: <!-- INCLUDE cblks/script.php?a={username} -->

In case one, I want to send the currently logged in user, and the script would deliver it's output to a previously named <iframe> for the purpose of delivering earned award graphics.

In case two, same situation, but this time I wish to pass the name of a profile owner to a script which would return a more enhanced profile html to a iframe in the profile section..

I realize that those proper names are not yet parsed through the php script at the template stage - so the question becomes, how to extract those variables from phpbb3 at run time to populate the field in the template?

Again, I know this is more of a phpbb3 inquiry than a style inquiry ....

An example of case one might be similar to your use of the chat script.. Something is passing the user names to that script ...

Re: Prospace

Posted: Mon May 03, 2010 5:21 pm
by spaceace
the php files pass the info to the templates for the template page that you're on. so, depending on what page you will be on, if you just want to use the phpBB calls for username, depends on what calls need to be made. but i'll look at a few things and let you know what i come up with ;)

Re: Prospace

Posted: Mon May 03, 2010 6:13 pm
by spaceace
ok, i have something that might do what you're wanting ;)

open language/en/common.php
find
Code: Select all
	'LOCK_TOPIC'						=> 'Lock topic',
add after
Code: Select all
	'LOGGED_IN_USER'					=> '%1$s',
open includes/functions.php
find
Code: Select all
// The following assigns all _common_ variables that may be used at any point in a template.
add before
Code: Select all
if ($user->data['is_registered'])
{
	$l_logged_in_user = 'LOGGED_IN_USER';
	$u_logged_in_user_url = get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']);
}   

$template->assign_vars(array(
	'LOGGED_IN_USER'	=> sprintf($user->lang['LOGGED_IN_USER'], $u_logged_in_user_url),

));
that will call the logged in username including their group colour

now for what you need to put into a template
Code: Select all
{LOGGED_IN_USER}
that's it ;)

let me know if it's what you were looking for.

Re: Prospace

Posted: Mon May 09, 2011 1:50 am
by Skulls
I have a question concerning the size of the post profile box on the left i would like to decrease its size by half maybe more could u please help i read the top section of this thread and tried to replace the code piece u gave earlier and then change the % but no luck .

Re: Prospace

Posted: Mon May 09, 2011 9:36 am
by Jackson
Don't forget to clear the board cache after each change

Re: Prospace

Posted: Tue May 10, 2011 3:42 am
by Skulls
yea I cleared it afterwords still no luck im trying to squeeze them down to like 7-10% wide I have tryed it a few different times still no luck i would be glad to throw a few bucks you guys way for the help on this and adding more buttons.