Jump to content

Recommended Posts

I'm new to php and mysql but quickly getting the basics down I've been sorting threw source file's and what not learning how different things are done...

 

I am trying to figure out somthing i've seen in the phpBB .tpl files...

 

when they use the variables like" {L_FAQ} and {L_LAST_VISIT} " it is printing a variable, that i understand.

 

What i don't understand is how ? when i want to load a variable i thought the

syntax was "$whatever" or $variable",somthing to that effect.

 

thanks in advance !,

hungry for knowlage!

Link to comment
https://forums.phpfreaks.com/topic/64213-phpbb-template-question/
Share on other sites

hmmm i don't think so? Here's what i'm talking about...

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr> 
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
  </tr>

 

I just can't seem to find where these are given there values?

I've been thinking the same as you. I get all confused also. From what I understand. they have a function that goes through the template and replaces the { Last Name } for the actual variable using str_replace() or the preg_math() function. How exactly i'm not sure, but I think that's the way of using it... like how the BBcodes

[b][/b] 

gets replaced with

<b></b>

ok i've finally found somthing...

i looked at the index.php and found this...

$template->assign_vars(array(
	'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
	'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
	'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'), 

	'FORUM_IMG' => $images['forum'],
	'FORUM_NEW_IMG' => $images['forum_new'],
	'FORUM_LOCKED_IMG' => $images['forum_locked'],

	'L_FORUM' => $lang['Forum'],
	'L_TOPICS' => $lang['Topics'],
	'L_REPLIES' => $lang['Replies'],
	'L_VIEWS' => $lang['Views'],
	'L_POSTS' => $lang['Posts'],

but i still can't figure out how it works??

like i said i'm VERY new to php just tryin to learn and thanks for all the pointers and advice,also

after all of the searching i've yet to find anything describing the "=>" usage??

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.