News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Site Integration Mod

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

Previous topic - Next topic

Nathaniel

I just remembered that this isn't as easy to do as I thought, I will work on a new version of my Mod which allows you to create permissions settings for your actions, as I just realised that this would be a very good addition to the Mod, it might take me a little while 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.

Father Time

I'm not sure if this is limited to me, but when I installed this mod it caused my forum to become non functional. Then when I uninstall the mod, even though it fixed the forum crash, it left fragments of itself everywhere, including the settings page in the admin panel (which at this point is non functional). There are about 20 alterations that you need to manually remove to completely remove this mod.

Personally, although it's concept is great, I think it needs some work to be called "safe".

Davy-D

Hi,

I get an error after installing the mod and trying to enter any directory to the "file/action include folders".

The error is: "Fatal error: Call to undefined function: scandir() in /homepages/10/d77508133/htdocs/forum/index.php on line 405"

Nathaniel

#23
I will look into these problems.

Which versions of SMF are you people using?

Edit:
Okay I tested it on SMF 2 Beta 3.1 and SMF 1.1.5, both worked perfectly, I also checked it on my live site which has millions of other mods installed. No clashes.

Father Time,
Could you please post the version of SMF and php you are using, as well as the exact error message because I was unable to replicate them.

Davy-D,
I am unsure why this is happening, it has to be something to do with the php versions because scandir() isn't supported by php4, my mod does however create a function for this in the sub-compat file meaning that it should work.

I will try to look into the php version error but I can't find any others.


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

If this is the error you were receiving then I have fixed it.

Warning: sort() expects parameter 1 to be array, boolean given in D:\Program Files\xampp\htdocs\index.php on line 67


It was an error due to something very stupid that I had done in the compatibility function for php4 which has now been corrected. Please try to redownload and reinstall the Mod. It should work this time. :)

If it doesn't the please post again because I am not sure if there are any other errors.
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

To get the Mod to work with SMF 1.1.5 and PHP 4, you will have to remove line 61 from the main SMF index.php file, which is below.


if (@version_compare(PHP_VERSION, '4.2.3') != 1)


I have done a series of identical demo sites, to test and show that the mod will work with different versions:

SMF 1.1.5 with php4, Site Integration Mod and DropDown Language Drop Mod
SMF 2 Beta 3.1 with php4 and Site Integration Mod. (To check language changes you can make an account)
SMF 1.1.5 with php5, Site Integration Mod and DropDown Language Drop Mod.
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]

Just wanted to say what a great mod this is! It's VERY easy to use!

To integrate it a bit more to a site (at least with the default theme -- but can easily be rewritten to work with any theme) I wrapped the whole thing in a nice page that includes the navlink, titlebars, and even tabs. Looks really good IMO. There are a few simple variables (my PHP is very limited) to set it all up. Then I made the already small SiteIntegration.template.php even smaller...lol. Anyway...

You can see the demo HERE.

I would be more than happy to attach my (modest) files if anyone is interested. All comments welcomed.

And thanks again LHVWB for a mod that even I can use. :P
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nathaniel

Thank you SunKing, my general aim was to make a mod that is easier to use than the SSI.php method. ;)

I am currently also working on yet another new version which is going to allow some settings to be made for each action which is being included. Its very easy to add these settings in so I am wondering if anyone has any suggestions for it. My current thinking is that you will be able to create a custom title (displayed in browser tab/window) and some custom permissions for each included action/file.

This is where I will add the ability to restrict permissions based on the request by Eclipse16V.

Any more suggestions for useful additions here would be most welcome. :)

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]

Well, for me and my rudimentary capabilities, it worked right out of the box.  :D

Is there/will there be a way to add sub-actions?
And, yes, permissions would be great too.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nathaniel

Adding subactions sounds interesting, I'll have a think about how I could do that.

In the meantime, to add subactions to your actions you can add some code like this into your pages (sa = subaction).


<?php

if($_GET['sa'] == "demo2")
{
     echo(
$demotext);
}
elseif(
$_GET['sa'] == "demo1")
{
     echo(
$demo2text);
}
else
{
     echo(
"Welcome to this subactions home".);
}
?>



What I am thinking is that you would have a setting for each action/file include in the part of the settings area which I am currently creating, which would allow you to either make it a subaction of another action or keep it as an action. I will see how easily I can implement this...

Thanks for the suggestion, :)
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]

Hey! The sub-actions work great! The possibilities are endless. The little rusty cogs in my head are beginning to move......
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Father Time

My PHP version is 4.1, and my SMF version is 1.1.4. I recieved the same issues as this user did:

Quote from: Davy-D on May 06, 2008, 05:36:35 PM
Hi,

I get an error after installing the mod and trying to enter any directory to the "file/action include folders".

The error is: "Fatal error: Call to undefined function: scandir() in /homepages/10/d77508133/htdocs/forum/index.php on line 405"

Eliana Tamerin

That means the mod didn't install properly. Check to see that all the edits have been made correctly.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Nathaniel

This Mod doesn't seem to work properly for php4, I am working on fixing this properly but below is a quick-fix.

For SMF 1.1.5 or 1.1.4, PHP 4:

Replace (from index.php):
// Using an old version of PHP?
if (@version_compare(PHP_VERSION, '4.2.3') != 1)
require_once($sourcedir . '/Subs-Compat.php');


With:
// Using an old version of PHP?
if (@version_compare(PHP_VERSION, '5') == -1)
require_once($sourcedir . '/Subs-Compat.php');


That will make it work perfectly for PHP4.

I am hesistant to actually fix this problem using the Mod because it appears to be an SMF wide problem.

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]

I was wondering if it were possible to set up the mod with the option whether or not to show all the upper stuff (header, user info block, etc). The reason I ask is because I have a few pages that need to be displayed minus the upper portion. Maybe you could have it with a variable (0 = disable header area, 1 = display header area) or similiar.

So then I could add SOME_VARIABLE = 0 at the top of the file and it would disable the header area (or something along those lines).

Probably not the best explanation in the world.  ;D
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nathaniel

#35
I will see what I can do, but it may be difficult because it will involve mucking around with template files, which is a pain because I will do it only for the main template which not many people use.

Anyway, attached are some screenshots of what the need version (v1.3) of the Mod will look like in SMF 2 Beta 3.1, at the moment I have almost finished it for the beta but it will take some time for me to port it back to SMF 1.1.5.

1st screenshot shows the general settings page. Note the new list section which will show all of the currently included files/actions.
2nd screenshot shows the manage page for a particular included action, allowing you to make settings which SMF will remember.

I should have this version out within a week, any other suggestions for settings that I could put in the action/file include management page (2nd screenshot), would be most welcome before then.

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.

Nathaniel

Quote from: SunKing on May 10, 2008, 02:24:03 AM
I was wondering if it were possible to set up the mod with the option whether or not to show all the upper stuff (header, user info block, etc). The reason I ask is because I have a few pages that need to be displayed minus the upper portion. Maybe you could have it with a variable (0 = disable header area, 1 = display header area) or similiar.

So then I could add SOME_VARIABLE = 0 at the top of the file and it would disable the header area (or something along those lines).

Probably not the best explanation in the world.  ;D

Okay, I looked into doing this and it seems that it would be a fair bit of work to set up for any particular template. Because of this is isn't feasable to try to implement it.

Also it wouldn't work because the header template function is loaded before the file is included meaning that you wouldn't be able to effect it at all.
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 very much for looking into it. I am looking forward to the new release too. Looks fantastic.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nathaniel

#38
Quote from: SunKing on May 10, 2008, 06:05:12 AM
Thank you very much for looking into it. I am looking forward to the new release too. Looks fantastic.

It looks good in SMF 2 Beta and it works really well, but porting it back to SMF 1.1.5 is really annoying. I am currently in the process of rewriting a whole lot of cool settings function for SMF 1.1.5 which are new to the beta.

These are the two main areas which I need to port back.
The permissions checkbox area, this is completely new to SMF 2 Beta, so I have to write my own set of functions for it.
The list of includes, the system which sets up this list is awesome in SMF 2 Beta but non-exsistant in SMF 1.1.5.

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]

I am running SMF 2.0 beta 3.1 so I am ready for it!  ;D
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Advertisement: