XMB Services
Setting The Standard
Last active: Never

Donate to XMB Services
Not logged in [Login - Register]
Go To Bottom


Printable Version | Subscribe | Add to Favourites  
 Pages:  1  2
Author: Subject: [In Progress] HOW TO integrate my site with XMB
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.
View User's ProfileView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
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??
View User's ProfileView All Posts By User U2U Member
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??
View User's ProfileView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
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.
View User's ProfileView All Posts By User U2U Member
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
View User's ProfileView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
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
View User's ProfileView All Posts By User U2U Member
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??
View User's ProfileView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
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.
View User's ProfileView All Posts By User U2U Member
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.
View User's ProfileView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
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: "
View User's ProfileView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
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/
View User's ProfileView All Posts By User U2U Member
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...
View User's ProfileView All Posts By User U2U Member
ldgarcia27
Junior Member
**




Posts: 43
Registered: 16/1/2007
Member Is Offline


[*] posted on 19/1/2007 at 20:54


No, none error messages...
View User's ProfileView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
ldgarcia27
Junior Member
**




Posts: 43
Registered: 16/1/2007
Member Is Offline


[*] posted on 19/1/2007 at 21:01


yes
View User's ProfileView All Posts By User U2U Member
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']);
}

View User's ProfileView All Posts By User U2U Member
Adam
Super Administrator
*********


Avatar


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:
Code:
print_r($self);
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?

http://www.xmbservices.com/images/paypal.gif
View User's ProfileVisit User's HomepageView All Posts By User U2U Member
 Pages:  1  2


Go To Top


Windows Live Alerts

Powered by XMB

XMB Link

Coffee Theme By Karl Davis

[queries: 19]
[PHP: 94.1% - SQL: 5.9%]