Full Site Integration

Discussion forum for MOD Writers regarding MOD Development.
User avatar
Mythyn
Registered User
Posts: 23
Joined: Tue Jun 08, 2010 4:48 pm

Re: Full Site Integration

Post by Mythyn »

Oh silly me I had added == 'Yes' lol thank you ever so much Noxwizard! This is great!!
User avatar
Saldash
Registered User
Posts: 619
Joined: Mon Nov 10, 2008 8:08 am
Location: Flintshire, UK
Name: Stuart Jackson

Re: Full Site Integration

Post by Saldash »

You could also use the boolean "TRUE" or "FALSE"

I didn't know that boolean had a third "unset" value, is that just phpBB specific?
World Recoded UK - DreamHost Site of the Month winner February 2011!
User avatar
Mythyn
Registered User
Posts: 23
Joined: Tue Jun 08, 2010 4:48 pm

Re: Full Site Integration

Post by Mythyn »

Hmmm just wondering... how would you go about making it so that if that custom field is activated to boolean Yes the user automatically gets a set private message with information about his new access?
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10570
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: Full Site Integration

Post by Noxwizard »

Saldash wrote:You could also use the boolean "TRUE" or "FALSE"

I didn't know that boolean had a third "unset" value, is that just phpBB specific?
phpBB's Boolean CPFs have three options; it's not a PHP boolean, so true/false doesn't work in this situation.


Mythyn wrote:Hmmm just wondering... how would you go about making it so that if that custom field is activated to boolean Yes the user automatically gets a set private message with information about his new access?
You'd have to modify the profile page, which would be /includes/ucp/ucp_profile.php. You would need to check the field's current value, then see if the value after updating is set to Yes, then use submit_pm() from /includes/functions_privmsgs.php to send a PM.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
User avatar
Mythyn
Registered User
Posts: 23
Joined: Tue Jun 08, 2010 4:48 pm

Re: Full Site Integration

Post by Mythyn »

Thank you Noxwizard!! I'll have a play around with the idea :D
x Daniel
I've Been Banned!
Posts: 117
Joined: Sat Jan 16, 2010 11:51 am
Location: Somewhere
Name: Dan

Re: Full Site Integration

Post by x Daniel »

Hello, I have a slight problem with this site integration php coding.

I'm using the following code to display a file called 'functions.php' which is in a sub-directory called '/docs/'.

Code: Select all

<?php include('/home/djforum1/public_html/Xplozion.co.uk/docs/functions.php'); ?>
However when I put an error file (like an error 404 file) in a different sub-folder, or the same one (/docs/).

When I navigate to a certain page it presents me with some sort of error saying that there is no such directory or it can't be found. Any help on what code to use to pull the php code for the forum data onto my page please?
x Daniel, Xplozion - Get exclusive web content and phpBB support
Image
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10570
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: Full Site Integration

Post by Noxwizard »

The actual error message would be helpful as you're a bit vague on how it's being used. If you're trying to start a phpBB session on an error page, then the phpBB root path will need to be an absolute path.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
x Daniel
I've Been Banned!
Posts: 117
Joined: Sat Jan 16, 2010 11:51 am
Location: Somewhere
Name: Dan

Re: Full Site Integration

Post by x Daniel »

Okay here is the error message I get when I move a file into sub directory...

Code: Select all

Warning: include(./forum/common.php) [function.include]: failed to open stream: No such file or directory in /home/djforum1/public_html/Xplozion.co.uk/docs/functions.php on line 11

Warning: include(./forum/common.php) [function.include]: failed to open stream: No such file or directory in /home/djforum1/public_html/Xplozion.co.uk/docs/functions.php on line 11

Warning: include() [function.include]: Failed opening './forum/common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/djforum1/public_html/Xplozion.co.uk/docs/functions.php on line 11

Fatal error: Call to a member function session_begin() on a non-object in /home/djforum1/public_html/Xplozion.co.uk/docs/functions.php on line 14
Functions.php is the file which contains all the phpbb integration information in it.
x Daniel, Xplozion - Get exclusive web content and phpBB support
Image
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10570
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: Full Site Integration

Post by Noxwizard »

That's what I figured. Your $phpbb_root_path will need to be an absolute path to the forum. Since the error document can be called from any directory, the relative paths won't be valid.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
x Daniel
I've Been Banned!
Posts: 117
Joined: Sat Jan 16, 2010 11:51 am
Location: Somewhere
Name: Dan

Re: Full Site Integration

Post by x Daniel »

Yeah I fixed it, thanks mate :)
x Daniel, Xplozion - Get exclusive web content and phpBB support
Image
User avatar
Vikestart
Registered User
Posts: 98
Joined: Sat Apr 25, 2009 5:14 pm
Name: Aleksander

Re: Full Site Integration

Post by Vikestart »

Hey :)

Is it possible to integrate the 'who is online section' with my website?

And also, is it possible to add custom entries for the 'who is online' like if they are on the contact page on my website it says 'Contact' in the 'who is online' ?

Thanks in advance! :D
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10570
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: Full Site Integration

Post by Noxwizard »

I suppose. You're essentially going to have to copy the bulk of that file. As for custom locations, you would add your page to the switch statement starting on line 196.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
User avatar
Vikestart
Registered User
Posts: 98
Joined: Sat Apr 25, 2009 5:14 pm
Name: Aleksander

Re: Full Site Integration

Post by Vikestart »

Thank you for your reply. Which file do I need to look in?

Thanks again ;)
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10570
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: Full Site Integration

Post by Noxwizard »

viewonline.php
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
User avatar
Vikestart
Registered User
Posts: 98
Joined: Sat Apr 25, 2009 5:14 pm
Name: Aleksander

Re: Full Site Integration

Post by Vikestart »

Could you help me a little more in detail how to integrate the 'who is online'? I don't wish to integrate the viewonline.php part, I wish to integrate the section you see at the bottom of index.php ;)

Return to “[3.0.x] MOD Writers Discussion”