| Pages: 1 2 |
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 19:27 |
|
|
[In Progress] HOW TO integrate my site with XMB
Hi,
I was wondering how to show the header info in pages other than the forum's.
Also use a restriction for pages only admins and moderators can access. |
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 19:43 |
|
|
The best method would be to use the custom page hack.
With the hack, you can create pages that have the forum header/footer so that they look integrated with your forum.
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 19:54 |
|
|
Is it compatible with the 1.9.6 version??
Where can I find it?? |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 19:55 |
|
|
How could I restrict pages to members and guests?? is it possible with that mod?? |
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 20:00 |
|
|
The mod can be downloaded from the downloads section, and is currently only available for 1.9.5.
I believe this should work with 1.9.6, and as it is a stand alone page it will not break your message board. The worst that can happen is that the
page don't work.
How much do you know about XMB?
What about PHP?
The reason I ask is that it is fairly easy to create restrictions on custom pages.
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:03 |
|
|
Well I am new to XMB, but I have a some experience with PHP and MySQL. |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:04 |
|
|
for example, I have www.mysite.com/forum/ and I want the info of the logged user to be available in www.mysite.com/otherdirectory/page.php |
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 20:06 |
|
|
In XMB you can use X_MEMBER, X_STAFF, X_ADMIN, X_SADMIN to check what status members are.
EG:
| Code: | if (!X_ADMIN) {
error('No Access');
} else {
Page contents here.
} |
error() <-- is an XMB function that displays the error message in a box.
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:07 |
|
|
I am trying to achieve this, but it doesnt works...
http://forums.xmbforum.com/viewthread.php?tid=760108 |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:10 |
|
|
X_STAFF is how moderators are classified?? |
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 20:11 |
|
|
So you want pages outside the forum directory to integrate with the forum?
What forum info do you wish to show on these page(s)?
How far have you got?
What errors, if any, do you get?
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:16 |
|
|
Well, I did all the tutorial said. I log into the forum and the Last Visit info and the log out/ control panel links are fine there. When I load the
page outside of the forum directory the Last Visit info prints as Never and the other links don't show. |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:20 |
|
|
I would also like to restrict pages outside the forum directory using the status of the logged user. for example, if its a moderator he can enter the
page. |
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 20:32 |
|
|
| Quote: | Originally posted by ldgarcia27
X_STAFF is how moderators are classified?? |
Correct.
X_STAFF is for Mods / Admins.
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 20:33 |
|
|
Can you send me a link to one of the pages?
Use u2u if you don't wish it to be public.
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 20:38 |
|
|
Try editing your call_xmb.php file:
Find Code:
| Code: | | define('ROOT', './forums/'); |
Replace Code With:
| Code: | | define('ROOT', '../forum/'); |
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:48 |
|
|
It doesn't works. I get "My username is: " |
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 20:52 |
|
|
Did your username show before you changed the file?
Do you get any error messages?
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:53 |
|
|
Is it the cookie when an user logs that is not being read?? even though I changed the full_url to http://www.mysite.com/ |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:54 |
|
|
No the username never showed up... |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 20:54 |
|
|
No, none error messages... |
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 21:00 |
|
|
I'm assuming you have replaced mysite.com with your actual domain name?
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 21:01 |
|
|
yes |
|
|
ldgarcia27
Junior Member

Posts: 43
Registered: 16/1/2007
Member Is Offline
|
posted on 19/1/2007 at 21:06 |
|
|
I found this in the header.php, can this be what is causing the problem???
| Code: |
// Create cookie-settings
if ( !isset($full_url) || empty($full_url) || $full_url == 'FULLURL' ) {
exit('<b>ERROR: </b><i>Please fill the $full_url variable in your config.php!</i>');
} else {
$array = parse_url($full_url);
if (substr($array['host'], 0, 9) == 'localhost' || preg_match("/^([0-9]{1,3}\.){3}[0-9]{1,3}$/i", $array['host'])) {
$cookiedomain = '';
}else{
$cookiedomain = str_replace('www', '', $array['host']);
}
if(!isset($array['path'])) {
$array['path'] = '/';
}
$cookiepath = ($array['path'] == '/') ? ('') : ($array['path']);
}
|
|
|
|
Adam
Super Administrator
       
Posts: 2710
Registered: 19/9/2005
Location: Birmingham, England
Member Is Offline
Mood: Tired
|
posted on 19/1/2007 at 21:08 |
|
|
Well, I'm not sure why it wouldn't work.
If it's loading the header.php file without errors, then it should show the information.
Try adding: to your test file in the other directory.
XMB Services Owner
Have you backed up your DB Today? You may regret not doing it one day.
Have I helped You?
 |
|
|
| Pages: 1 2 |