MySQL + PHP - Forums/Website Integration
Posted: Thu Jul 10, 2008 12:39 am
Okay well I have been working in php for awhile, but only the basics. So I started working into higher level stuff and all. But today I came accorss an error where it doesn't connect, and messes up everything (with errors). I'll show what I had, what I'm trying to get, and what happens.
Okay well first of all on the forums (is standard), I have the MemberBar.

The code for the above^^ is:
Now when I set that up on the main site (through the fourms) using:
My outcome looks like this:

One Question is; is there another way? (Note: The Source must be dynamic because if the user has admin rights, they will be able to see the link to the Admin Panel.)
Second Question is: Can someone fix the current source?
Okay well first of all on the forums (is standard), I have the MemberBar.

The code for the above^^ is:
Code: Select all
<if="$this->ipsclass->member['id']">
<div id="userlinks">
<p class="home"><b>{$this->ipsclass->lang['logged_in_as']} <a href="{$this->ipsclass->base_url}showuser={$this->ipsclass->member['id']}">{$this->ipsclass->member['members_display_name']}</a></b> ( <a href="{$this->ipsclass->base_url}act=Login&CODE=03&k={$this->ipsclass->md5_check}">{$this->ipsclass->lang['log_out']}</a> )</p>
<p>
<else />
<div id="userlinksguest">
<p class="pcen"><b>{$this->ipsclass->lang['guest_stuff']}</b> ( <a href="{$this->ipsclass->base_url}act=Login&CODE=00">{$this->ipsclass->lang['log_in']}</a> | <a href="{$this->ipsclass->base_url}act=Reg&CODE=00">{$this->ipsclass->lang['register']}</a> )
</if>
<if="$this->ipsclass->member['mgroup'] == $this->ipsclass->vars['auth_group']">
<b><a href="{$this->ipsclass->base_url}act=reg&CODE=reval">{$this->ipsclass->lang['resend_val']}</a></b> ·
</if>
<if="$this->ipsclass->member['g_access_cp'] == 1 AND $this->ipsclass->vars['security_remove_acp_link'] == 0">
<b><a href="{$this->ipsclass->vars['_admin_link']}" target="_blank">{$this->ipsclass->lang['admin_cp']}</a></b> ·
</if>
<if="$this->ipsclass->member['has_blog'] == 1">
<b><a href="{$this->ipsclass->base_url}automodule=blog&req=showblog&mid={$this->ipsclass->member['id']}">{$this->ipsclass->lang['myblog']}</a></b> ·
</if>
<if="$this->ipsclass->member['has_gallery'] == 1">
<b><a href="{$this->ipsclass->base_url}autocom=gallery&req=user&user={$this->ipsclass->member['id']}">{$this->ipsclass->lang['submenu_albums']}</a></b> ·
</if>
<if="$this->ipsclass->member['id']">
<b><a href="{$this->ipsclass->base_url}act=UserCP&CODE=00" title="{$this->ipsclass->lang['cp_tool_tip']}">{$this->ipsclass->lang['your_cp']}</a></b> · <a href="{$this->ipsclass->base_url}act=Search&CODE=getnew">{$this->ipsclass->lang['view_new_posts']}</a>
<if="$this->ipsclass->member['g_view_board']">
· <a href="javascript:buddy_pop();" title="{$this->ipsclass->lang['bb_tool_tip']}">{$this->ipsclass->lang['l_qb']}</a>
</if>
· <a href="javascript:friends_pop();">{$this->ipsclass->lang['gbl_my_friends']}</a>
</if>
<if="$this->ipsclass->member['g_use_pm'] AND $this->ipsclass->member['members_disable_pm'] == 0">
· <a href="{$this->ipsclass->base_url}act=Msg&CODE=01">{$msg['TEXT']}</a>
</if>
</p>
</div>Code: Select all
<?php include('/../fourms/bar.php'); ?>
One Question is; is there another way? (Note: The Source must be dynamic because if the user has admin rights, they will be able to see the link to the Admin Panel.)
Second Question is: Can someone fix the current source?