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

Jennahan

#40
Why variables like $user_info['groups']['0'] doesn`t work?

Eliana Tamerin

Because it's supposed to be if ($user_info['groups'] == 0) {}.
Do NOT PM me for support.

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

Jennahan

I mean... When I was making site using SSI.php i could write if(in_array(5, $user_info['groups'])) and it worked well.

With this mod it doesn`t work. That was my point.

Jennahan

So any suggestion what I need to do to handle it?

Nathaniel

#44
This will still work perfectly, but there is something that you have to do before you can use the variable. Because it is a global variable and the file is being included from a function, you need to use some code like this.


global $user_info;


In the next release I will declare a whole load of global variables at the beginning of the function which includes your files so that you don't have to do this, but in the meantime you have to global it.

I have made a change to the mod main page to make this very clear.

At the moment only the $context global variable is being used by the including function.

List of current SMF global variables that the function accesses.
$context
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

At first I thought maybe this mod would let me easily add a customized top navigation to my forum, to make it really easy for me to keep a global menu for all my web-apps. However, it seems your in-progress "Custom Menu Mod" is the exact thing I was looking for. Sorry for bringing a slightly off-topic post in here, but I was just wondering: Is there a thread up already somewhere regarding your "Custom Menu Mod"? I would very much like to follow it's development, and test if for you if you'd like (I'm a very low-tech user).

Nathaniel

#46
Quote from: Sadr on May 12, 2008, 07:35:54 AM
At first I thought maybe this mod would let me easily add a customized top navigation to my forum, to make it really easy for me to keep a global menu for all my web-apps. However, it seems your in-progress "Custom Menu Mod" is the exact thing I was looking for. Sorry for bringing a slightly off-topic post in here, but I was just wondering: Is there a thread up already somewhere regarding your "Custom Menu Mod"? I would very much like to follow it's development, and test if for you if you'd like (I'm a very low-tech user).

Yes this is one of the things that I am keeping in Mind. The Site Integration Mod is only so useful without the ability to actually change the Menu system.

My current plan is to finish the next version of the Site Integration Mod in the next few days and then continue with the Custom Menu Mod, which I should have completed for SMF 2 Beta sometime across the next few weeks. I have already done most of the work for the Custom Menu Mod, I just stopped working on it to finish this Mod.

I have exams starting in a few weeks so the Custom Menu Mod may end up waiting for the completion of those in about 5 weeks.

I will post back here with any updates on that Mod.

Edit: One thing that I am wondering.

The Custom Menu Mod will allow you to customize the menu and create your own submenus, because of this is will have options about where it should put the normal forum buttons, either in the mainmenu, a submenu or in places of your chosing (ie. it won't add it anywhere).

I am wondering what you actually want to do. Do you just want to add a few buttons to the normal SMF menu? Or do you want to be able to create a submenu for each mainmenu button so that you separate your website into sections each with a different mainmenu button and submenu?
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: LHVWB on May 13, 2008, 02:19:16 AM(...) I am wondering what you actually want to do. Do you just want to add a few buttons to the normal SMF menu? Or do you want to be able to create a submenu for each mainmenu button so that you separate your website into sections each with a different mainmenu button and submenu?
What I want to do might require so much self-editing that there's really nothing a mod can do about it. What I have in mind is exactly what you see here on this board (or as in another example here); the standard forum menu, and above it, over the banner, a global menu for use on the entire webpage, not just the forum alone.

I guess I imagined that maybe your mod could make this procedure easier somehow, like being able to add a banner, then add the navigationbars of your choice either on top of or right under the top-banner. But that might be asking a lot. Seeing now what you actually had planned for this mod, I do see other ways that it could be og great use to me though.

Nathaniel

What you want to do would be entirely possible with the Mod that I am going to create, it would just mean that you would have to do some editing of your favorite theme, which is going to have to happen for anyone that wants to use the Mod and doesn't want to use the default theme.

When I finish the Mod I will make simple instructions, explaing how you can use the output of the system with a theme that hasn't been edited for the Mod before.
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

#49
Okay, I have now finished making the new version of the Mod and it works for both SMF 1.1.5 and SMF 2 Beta, I will upload it later after some testing.

So that this mod will work for SMF 1.1.4 or SMF 1.1.5 you need to have the Extra Settings Framework Mod installed, but as this Mod is yet to be accepted I have attached it to this post.

* The Attachment has been removed by LHVWB for licensing reasons *
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: LHVWB on May 13, 2008, 07:44:06 PM
What you want to do would be entirely possible with the Mod that I am going to create, it would just mean that you would have to do some editing of your favorite theme, which is going to have to happen for anyone that wants to use the Mod and doesn't want to use the default theme.
Would this be the kind of edits that the package installer could handle for you? I've got about 5 mods already that needed edits on custom themes, but I still didn't have to do a thing myself because the package installer took care of it as long as I told it to install the mod on the custom themes as well. My love for SMF 2.0 grows stronger with every admin-action  :-*

Nathaniel

Quote from: Sadr on May 14, 2008, 09:09:49 AM
Quote from: LHVWB on May 13, 2008, 07:44:06 PM
What you want to do would be entirely possible with the Mod that I am going to create, it would just mean that you would have to do some editing of your favorite theme, which is going to have to happen for anyone that wants to use the Mod and doesn't want to use the default theme.
Would this be the kind of edits that the package installer could handle for you? I've got about 5 mods already that needed edits on custom themes, but I still didn't have to do a thing myself because the package installer took care of it as long as I told it to install the mod on the custom themes as well. My love for SMF 2.0 grows stronger with every admin-action  :-*

No unfortunately probably not, there is a possibility that this could work for SMF 2 Beta with the limited number of Mods, but unfortunately most of the time (especially for SMF 1.1.5) it will involve manually editing the specific template file, I will however give detailed instructions. This will happen especially for SMF 1.1.5 because I will be porting back the new dynamic showing of the template which occurs in SMF 2 Beta, which is likely to create a range of errors for every template but I will try and make my explanation clear enough... :)

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

Okay, I have finally  completed the lastest version of this Mod.

WARNING: If you are using SMF 1.1.5 you will need the ExtraSettingsFramework Mod for this Mod to work, as I have added a few settings which require this Mod to be installed. If you don't have this Mod then you will get fatal errors when you try to manage the settings. The ExtraSettingsFramework Mod is currently not approved but I have attached it to this thread.

Updating your version of the Mod involves, uninstalling it and then re-installing the lastest version, you will not lose any data.

Here are the changes:

v1.3
Added permissions and title management of included files/actions.
Fixed up all errors which were occuring with PHP4.
Removed semi-completed language translations.
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]

#53
Thanks! However, there was a small problem uninstalling 1.2 (dealing with the ManageSettings.php) where it didn't remove everything. The installation was fine for 1.3 but I had to input all of the settings again (no big deal). The old settings are still there under the Modifications Section (original location) except the text strings are missing. Don't misunderstand, this is a fantastic mod.  :D I just wanted to post my findings so that these small issues can be resolved making it an even better mod! Also, you may want to put a brief description next to each setting of exactly what it does.

Thanks again for a great mod.

[EDIT]:

Anyone else with the same problem can simply uninstall the old version, then
open ManageSettings.php (in the Sources dir)
find the following:
// Site Integration Mod Settings.
'',
'<u>'.$txt['integrationmod_generalsettings_heading'].':</u>',
array('text', 'integrationmod_site_includes_folders'),
'',

and simply remove it. You can then install version 1.3.

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



[unplugged]

Another small request.  ;D

Could you add a link in the Manage screen to delete each file? This would just make it quite convenient.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nathaniel

Quote from: SunKing on May 15, 2008, 10:29:54 AM
Thanks! However, there was a small problem uninstalling 1.2 (dealing with the ManageSettings.php) where it didn't remove everything. The installation was fine for 1.3 but I had to input all of the settings again (no big deal). The old settings are still there under the Modifications Section (original location) except the text strings are missing. Don't misunderstand, this is a fantastic mod.  :D I just wanted to post my findings so that these small issues can be resolved making it an even better mod! Also, you may want to put a brief description next to each setting of exactly what it does.

Thanks again for a great mod.

[EDIT]:

Anyone else with the same problem can simply uninstall the old version, then
open ManageSettings.php (in the Sources dir)
find the following:
// Site Integration Mod Settings.
'',
'<u>'.$txt['integrationmod_generalsettings_heading'].':</u>',
array('text', 'integrationmod_site_includes_folders'),
'',

and simply remove it. You can then install version 1.3.



I was unaware of this issue, I will investigate it when I have some time this weekend. I did however just remember that there is a problem with data loss between the versions even though I said there wasn't because I renamed the settings... ;) I will try to make a script which will fix this, as an edition to the mod which will search for the old variables and then rename them. Should be easy to do! :)

Thank you,


Quote from: SunKing on May 15, 2008, 10:56:51 AM
Another small request.  ;D

Could you add a link in the Manage screen to delete each file? This would just make it quite convenient.

That would probably be very simple to do, so I will think about making a new version with some sort of renaming/deleting capabilities for these files. If I find the time then I might even try to make it into a peusdo file manager. ;)

Any other suggestions or comments would be most welcome.

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]

Thanks so much. I'm not usually the type to bother with small request, if any at all...lol...but I really see a lot of potential with this one.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Sakae

Hi, I installed the last version in my SMF 1.1.5, but got this error when tried to access action=featuresettings;sa=siteintegration:

QuoteFatal error: require_once() [function.require]: Failed opening required '/home/xxxxx/public_html/forum/Sources/Subs-List.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxx/public_html/forum/Sources/ModSettings.php on line 755
http://www.tigrelog.com.br
l: simple p: machines

[unplugged]

#58
Quote from: LHVWB on May 15, 2008, 04:44:27 AM
WARNING: If you are using SMF 1.1.5 you will need the ExtraSettingsFramework Mod for this Mod to work, as I have added a few settings which require this Mod to be installed. If you don't have this Mod then you will get fatal errors when you try to manage the settings. The ExtraSettingsFramework Mod is currently not approved but I have attached it to this thread.

Updating your version of the Mod involves, uninstalling it and then re-installing the lastest version.

Did you make sure to also install the other required mod (found here)?
It's required to run the Site Integration Mod on SMF 1.1.5.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nathaniel

Okay just a quick update.

I have fixed the issue with the upgrading from version 1.2 to version 1.3. Installing the new version will automatically keep the database settings from the old version.

Also, In response to SunKing's question about adding some deleting functionality, I have decided that this is not crucial to the Mod, and that it can wait until after I have completed the CustomMenu Mod. I am hesitant to add a file manager or similar features because they will require a fair bit of work and the same functionality is usually provided by a ftp client or a file manager provided by your webhost. The general idea of this mod is that you make, name and control the files from outside of SMF, by using the tools that you would normally use to make a website.

In relation to the question about when I will finish the CustomMenu Mod, it is likely to be in about a 5 to 6 weeks, because I have a ton of exams and projects which I have to do in the next 4 weeks. I might make a simple Dev version before then but I will have to see.

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.

Advertisement: