Help With My Classic Theme Modification (parse error)

Started by Xarcell, June 04, 2005, 08:17:48 PM

Previous topic - Next topic

Xarcell

I have heavily alter the classic theme at my clan site www.veoclan.com

However, I know a little html/css, I don't know any php. I'm having problems trying to figure out the php code and how I can place table around all my poster info on my display-template.

I need each bit of info with a table cell.



// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
echo '
', $message['member']['title'], '<br />';










// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
', $message['member']['post_group'], '<br />';
echo '
', $message['member']['group_stars'], '<br />';

// Is karma display enabled?  Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
<br />
', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '<br />';
elseif ($modSettings['karmaMode'] == '2')
echo '
<br />
', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '<br />';

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], '">', $modSettings['karmaApplaudLabel'], '</a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], '">', $modSettings['karmaSmiteLabel'], '</a><br />';

// Show online and offline buttons?
if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
echo '
', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $message['member']['online']['image_href'] . '" alt="' . $message['member']['online']['text'] . '" border="0" align="middle" />' : $message['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $message['member']['online']['text'] . '</span>' : '', '<br /><br />';

// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
echo '
', $txt[231], ': ', $message['member']['gender']['image'], '<br />';

// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']))
echo '
', $message['member']['avatar']['image'], '<br />';

// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
', $message['member']['blurb'], '<br />
<br />';




Any help on how I can do it without getting a parse error. Standard html doesn't work.

Thanx,

-xarcell

[Unknown]

Well, you'll notice those are at different levels of indentation.  If you were to add elements above and below the quoted code, you would have problems for guests.

Anyway, the idea would be:

echo '<table><tr><td>';

Before, and:

echo '</td></tr></table>';

After.

-[Unknown]

Xarcell

So, if I do that, it may create problems fer guests?

I'll tinker with it an see.

Thanx

-Xarcell

Xarcell

I didn't like the table layout, so I went with <HR> with the php you suggested. Works beautifully, and doesn't seem to have any problems with guests (everything is turned on).

Thanx fer yer help.

Advertisement: