Site Integration Mod

Started by live627, April 29, 2008, 07:45:20 PM

Previous topic - Next topic

Nathaniel

Quote from: KarKess on July 04, 2008, 05:36:43 AM
Gotcha! ;)  I'm mistaken, I thought this mod actually put smf on your web page using your webpages' header and footer placing smf in between.  Dangit, this means work.  Hi-Ho-Hi-Ho!

Unfortunately customising your SMF install so that it works the way you want it, can sometimes mean 'getting your hands dirty' with some php coding. ;) But its always a fun learning experience. :D

I'm sure that plenty of people will be willing to help out (myself included) if you have any problems. :)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

openinteractive

Quote from: openinteractive on June 28, 2008, 10:42:13 PM
thanks for the suggestions guys.
i ended up using a not so elegant hack to the index.php file.

simply added the following:

if(!$_GET["action"]){
   $_GET["action"] = "home";
}


basically if action is not set, define it as home.
which happens to be my home page file name....

just thought id share in case anyone else needs a temporary fix until the next version is available.

cheers!


So as it turns out, this method doesnt really work like i though. while inside the forums, the url pat changes to this format: /index.php/board,3.0.html
which seems to cause problems in the navigation.

so i guess ill wait for your next version to be complete. any questimation on when that might be?

thanks for the sweet mod. looking forward to the next version!

Nathaniel

#122
Quote from: openinteractive on July 05, 2008, 03:07:21 PM
so i guess ill wait for your next version to be complete. any questimation on when that might be?

thanks for the sweet mod. looking forward to the next version!

Yeah, sorry about the wait. I went on a small holiday where I didn't have a computer so I couldn't do any more work on any of my Mods. In terms of a timeframe, I am going to try to update it in the next few days if my time permits, otherwise I definitely hope to have it finished before the end of the week.

Currently I am going to add searching and including of these extensions types.
.php, .html, .htm

If you can think of any others then please tell me.

I am thinking about giving admin a choice of extensions to include anyway, so its not the important.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Nathaniel

I have now updated the Mod to version 1.4, below is a list of the extensive changes that were made for the new version. I will update the documentation on the download page sometime in the next few hours.

v1.4 Changes.
A minor bugfix, there was a html error in the template file, also fixed displaying of Mod version.
Removed 'official' support for SMF 1.1.4 and SMF 2 Beta 3.0, although the mod should still work for them.
Added settings to change home/default and error actions.
Added option to display the title of an included action in the whosonline list.
Added the use of custom file extensions.
Added a language string prefix for included titles, and implemented checking for a language string for them.

I know that I've said this before, but I am going to try to stop ;) adding new features to this mod, unless there are any really useful ones that somebody can think off. I want to finish my other mods and do some work, I will however still be fully supporting this mod and slowly developing it, and update it for future versions of SMF.

I chose to remove the 'official' support for SMF 1.1.4 and SMF 2 Beta 3.0 because I don't want to use the time to check that this mod works for those older versions, its difficult enough making it work for two completely different versions, let alone checking it for older versions.

Thank you,
LHVWB
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

[unplugged]

#124
I installed the latest version of the mod under SMF 2.0 and receive the following error:

Fatal error: template_siteintegration(): Failed opening required '/home/content/*****/html/forum/s' (include_path='.:/usr/local/lib/php') in /home/content/*****/html/forum/Sources/Load.php(2204) : eval()'d code on line 21

The s is the first letter of the folder that the actions are in (I changed the name of the folder a few times and each time that letter is the first letter of the newly named folder).

      //   Include the page.
      require_once($context['file_include']);

is where the error is occurring I believe (Line 21).


EDIT:  If I hardcode the $folder and $current_folder to point to my actions folder, then all works as desired.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nathaniel

#125
Okay, I'll check the mod and see if I can reproduce the error.

Edit: I am having difficulty trying to reproduce the error, it seems to work fine for me...

Could you please post your index.php file?

I believe that the last version of the Mod may not have uninstalled properly on your forum, this error actually occurs where the actions are added to the $context['siteintegration_actions'] array. You probably have some code from the last version of the mod overriding this array, you probably have two sets of similar code after the $actionArray is defined.

The odd error with the one letter being passed is because in LoadFile.php I use the code "$context['file_include'] = $boarddir."/".$context['siteintegration_actions'][$context['current_action']][0];" to get the location of the current action's file, which is stored as the first element in an array for version 1.4, but for version 1.3.1 its stored as a string, so taking the first element of that string means taking the first letter... ;) When the old code overrides the $context['siteintegration_actions'] array, it replaces the array values with strings thus causing your annouying error...  :(

To say it more clearly, this is not an error with the new version of the Mod. Its just one of those annoying errors that you get sometimes, I think that its the package managers fault, unless you forgot to remove everything and you uninstalled it manually... ;)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Nathaniel

Hmm, I just did another small update, of the mod. I didn't bother changing the version number though, there was just an error where users could get into an infinite loop of redirections if they don't have the permissions to view the home or invalid action pages/actions.... ;) Problem Fixed! :D
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Sudhakar Arjunan

Hey LHVWB,

I am trying to install in My Forum.

Found the index.php page is error - 1.     Execute Modification     ./index.php     Test failed

I had tried to mod it manually, and found the // Action and board are both empty... BoardIndex! in index.php was been failed to patch.
Since am using Simple Portal in my forum.

will code the difference here ,


// Action and board are both empty... BoardIndex! if (empty($board) && empty($topic)) { // Allow the system to continue... // This must happen because there may be a custom default/home action, in the as yet undefined array. $load_home = true; }


The code which is there when i install Simple portal is ,


// Action and board are both empty... SPortal!
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/SPortal.php');
return 'SPortal';
}
if (empty($board) && empty($topic) && (isset($_GET['cat']) || isset($_GET['page'])))
{
require_once($sourcedir . '/SPortal.php');
return 'SPortal';
}


Kindly check out and tell me what i have to do to install Site Integration mod.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

[unplugged]

I am having some problems with my package manager, so that's probably the culprit.

I've attached my index.php.

Thanks for your time.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nathaniel

#129
@SunKing, I have had a look at your index.php file and removed the parts added by the old version of the mod. The first attached index.php has no version of the mod installed, while the second has the latest version (1.4) so that you can see what your index.php file should look like after you installed it on the first index.php file. I hope that made sense... ;)

@asudhakar, I have next to no experience with Simple Portal, but I will have a look at the confliction and see if there is a way around it. I will post back when I find a way...
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

[unplugged]

Thank you much. It works great now.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nathaniel

@asudhakar, I believe that I have the solution to the compatibility issues between these two mods. I am going to structure the rest of this post as a tutorial as a reference for any one else that wants to use these two mods together.


Fixing Compatibility between the Site Integration Mod v1.4 and the Simple Portal Mod v1.2 for SMF 1.1.x:


Please note that this tutorial assumes that you do install Simple Portal v1.2 first, and then the Site Integration Mod v1.4.

First you will need to install "Simple Portal v1.2" and then install the "Site Integration Mod 1.4", there SHOULD be errors for the install of the Site Integration Mod. However, please check that the only errors occur for the index.php file for the Site Integration Mod, those are the ones that the rest of the tutorial will show you how to fix.


Find this Code:
        // Action and board are both empty... SPortal!
        if (empty($board) && empty($topic))
        {
            require_once($sourcedir . '/SPortal.php');
            return 'SPortal';
        }
        if (empty($board) && empty($topic) && (isset($_GET['cat']) || isset($_GET['page'])))
        {
            require_once($sourcedir . '/SPortal.php');
            return 'SPortal';
        }



Change to:
// Action and board are both empty... SPortal!
if (empty($board) && empty($topic) && (isset($_GET['cat']) || isset($_GET['page'])))
{
require_once($sourcedir . '/SPortal.php');
return 'SPortal';
}
elseif (empty($board) && empty($topic))
{
//require_once($sourcedir . '/SPortal.php');
//return 'SPortal';
$load_home = true;
}


Find this code:
// Place the forums home
'forums' => array('BoardIndex.php', 'BoardIndex'),


And add this code afterwards.
'portal' => array('SPortal.php', 'SPortal'),

You will now be able to access your Simple Portal at "index.php?action=portal", if you want to set it as your home page then go into the settings for the Site Integration Mod and set the "Forum Default/Home Action" setting to "portal".

(If you want to change the action which you access the Simple Portal Mod at, then change the 'portal' part of the last code change to the action that you want it to be at, be careful not to set it to an internal SMF action though.... ;))
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

scvoyager

Quote from: LHVWB on June 28, 2008, 07:23:12 PM
What do I need to install this mod and where can I get it?
As I said in that earlier post, you no longer need that other mod to run the Site Integration Mod for SMF 1.1.4 or SMF 1.1.5. That was the whole point of the 1.3.1 version of the mod. I am sorry that I forgot to remove the message about it in the install page, and I am sure that it has created some confusion, I will definetly remove it when I update this mod next (~1week).

Has somebody give a try to integrate more than a single php page?
I have no idea, there was somebody earlier who gave this a go, but I am not sure how successful they were.  If you could do it then it would involve steps like changing the base url of the software package to an action within SMF, renaming the index.php (of the software package) to something else (say wiki.php for action=wiki) and etc. I am happy to try and give this software package a go when I get some time.

If you are asking if someone has used this mod to integrate multiple websites then I will have to say yes. I'm currently running your great mod and currently have 4 sites integrated and these are not small websites. Some work needs to be done with changing urls manually but my biggest site that has over 1200 pictures and videos only took me a half hour to do. Permissions by website page will be my next step.

This mod is one of the best I have ever come across and we are all lucky to get it for free...

 

Nathaniel

@ scvoyager,
Thank you for the feedback. Its encouraging to know that somebody has made a good website with the help of this mod! :D
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

erlend_sh

Quote from: scvoyager on July 10, 2008, 09:09:17 PM(...)
I'm currently running your great mod and currently have 4 sites integrated and these are not small websites. Some work needs to be done with changing urls manually but my biggest site that has over 1200 pictures and videos only took me a half hour to do. Permissions by website page will be my next step.  
Could you please post a link to your site? It would be nice to see an example of how this mod has been used, because its exact intended usage still confuses me ;D
Maybe LHVWB could even use it as an example link?

Nathaniel

@ Sadr,
Yeah, I'm sorry that I haven't put a demo site up yet, I've been meaning to for ages, but whenever I get some time, I start making another Mod and then I forget to put up better documentation for the Mods that I've finished... Hopefully, I'll put up a demo site sometime within the next little while (a few days?)... ;)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

scvoyager

Quote from: Sadr on July 10, 2008, 10:11:49 PM
Quote from: scvoyager on July 10, 2008, 09:09:17 PM(...)
I'm currently running your great mod and currently have 4 sites integrated and these are not small websites. Some work needs to be done with changing urls manually but my biggest site that has over 1200 pictures and videos only took me a half hour to do. Permissions by website page will be my next step.  
Could you please post a link to your site? It would be nice to see an example of how this mod has been used, because its exact intended usage still confuses me ;D
Maybe LHVWB could even use it as an example link?
Here is a link to one of the websites that has been integrated into smf. http://philippinenightlifeforum.com/index.php/action,hotels.html [nofollow]

Please note when you leave that link you will start working your way up to adult rated content!!!

openinteractive

Quote from: openinteractive on July 05, 2008, 03:07:21 PM
Quote from: openinteractive on June 28, 2008, 10:42:13 PM
thanks for the suggestions guys.
i ended up using a not so elegant hack to the index.php file.

simply added the following:

if(!$_GET["action"]){
   $_GET["action"] = "home";
}


basically if action is not set, define it as home.
which happens to be my home page file name....

just thought id share in case anyone else needs a temporary fix until the next version is available.

cheers!


So as it turns out, this method doesnt really work like i though. while inside the forums, the url pat changes to this format: /index.php/board,3.0.html
which seems to cause problems in the navigation.

so i guess ill wait for your next version to be complete. any questimation on when that might be?

thanks for the sweet mod. looking forward to the next version!


Hey just checking in. Hows the progress on the site integration mod coming?

Also,
Im starting to think about SEO friendly URLs. have you given any thought to this?
im guessing all it would take is a well crafted .htaccess file using mod_rewrite.

any thoughts on this?



Nathaniel

Quote from: openinteractive on July 15, 2008, 09:52:24 PM
Hey just checking in. Hows the progress on the site integration mod coming?

Also,
Im starting to think about SEO friendly URLs. have you given any thought to this?
im guessing all it would take is a well crafted .htaccess file using mod_rewrite.

any thoughts on this?

Progress has gone well, I released version 1.4 of this Mod about a week ago, and at the moment, (unless I think of some more good features to add) that will the last update for this Mod for a while. Except updating for new versions of SMF, of course. I am now working mostly on a series of other Mods.

In terms of SEO friendly URLS, I haven't really looked into them, but I believe that they would have to be a separate Mod, because otherwise this Mod would start becoming too huge, and if you made internal SMF actions work with a SEO mod, then the Site Integration Mod should be completely compatible, so I don't have any intention of adding any features relating to SEO to this Mod.

The bigger the Mod, the more likelyhood that it will have some clashes with other mods, which has already happend between v1.4 of this Mod and the Simple Portal Mod, because of this I sort of subscribe to the idea that Mods should be as specific to a certain task as possible, without reducing features or functionality of course, just making more mods that have less general features per mod.

Here is one SMF Mod that I found relating to SEO friendly URLS:
http://custom.simplemachines.org/mods/index.php?mod=636

If you want a Mod that does some more for SEO, then maybe you should put a request in the Mod Requests Board?
http://www.simplemachines.org/community/index.php?board=79.0
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

openinteractive

awesome. i must have missed the release.

so the new version lets you define action=home as the default home page?

Advertisement: