• Welcome to Simple Machines Community Forum. Please login or sign up.

Site Integration Mod

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

Previous topic - Next topic

live627

April 29, 2008, 07:45:20 PM Last Edit: September 14, 2008, 02:34:12 AM by LHVWB

[url=https://custom.simplemachines.org/index.php?mod=1146]Link to the mod[/url]


Apllicmz

did have demo...

translate Portuguese

help

<file name="$themedir/languages/Help.portuguese-utf8.php" error="skip">
<operation error="skip">
<search position="before"><![CDATA[
$helptxt = array();
]]></search>
<add><![CDATA[

// Help for the Site Integration Mod
$helptxt['integrationmod_site_includes_folders'] = 'Esta configura&#231;&#227;o permite a voc&#234; adicionar v&#225;rias pastas, por que os separam por v&#237;rgulas. Todas as situa&#231;&#245;es. Php esses arquivos em pastas ser&#227;o convertidas em ac&#231;&#245;es atrav&#233;s da SMF.<br/><br/>Observe que a pasta nomes s&#227;o relativos &#224; SMF diret&#243;rio home. (eg. \'file_includes\' will load actions from \'(SMF Home Directory)/file_includes/\')<br/><br/>Note tamb&#233;m que n&#227;o importa se voc&#234; usar barras no in&#237;cio ou no fim da pasta nomes, eles est&#227;o no meio nessesario por&#233;m se voc&#234; estiver tentando carregar uma sub-pasta (eg. \'file_includes/files\').';

]]></add>
</operation>
</file>
<file name="$themedir/languages/Help.brazilian-utf8.php" error="skip">
<operation error="skip">
<search position="before"><![CDATA[
$helptxt = array();
]]></search>
<add><![CDATA[

// Help for the Site Integration Mod
$helptxt['integrationmod_site_includes_folders'] = 'Esta configura&#231;&#227;o permite a voc&#234; adicionar v&#225;rias pastas, por que os separam por v&#237;rgulas. Todas as situa&#231;&#245;es. Php esses arquivos em pastas ser&#227;o convertidas em ac&#231;&#245;es atrav&#233;s da SMF.<br/><br/>Observe que a pasta nomes s&#227;o relativos &#224; SMF diret&#243;rio home. (eg. \'file_includes\' will load actions from \'(SMF Home Directory)/file_includes/\')<br/><br/>Note tamb&#233;m que n&#227;o importa se voc&#234; usar barras no in&#237;cio ou no fim da pasta nomes, eles est&#227;o no meio nessesario por&#233;m se voc&#234; estiver tentando carregar uma sub-pasta (eg. \'file_includes/files\').';

]]></add>
</operation>
</file>




Help not utf8

<file name="$themedir/languages/Help.portuguese.php" error="skip">
<operation>
<search position="before"><![CDATA[
$helptxt = array();
]]></search>
<add><![CDATA[

// Help for the Site Integration Mod
$helptxt['integrationmod_site_includes_folders'] = 'Esta configuração permite a você adicionar várias pastas, por que os separam por vírgulas. Todas as situações. Php esses arquivos em pastas serão convertidas em acções através da SMF.<br/><br/>Observe que a pasta nomes são relativos à SMF diretório home. (eg. \'file_includes\' will load actions from \'(SMF Home Directory)/file_includes/\')<br/><br/>Note também que não importa se você usar barras no início ou no fim da pasta nomes, eles estão no meio nessesary porém se você estiver tentando carregar uma subpasta (eg. \'file_includes/files\').';

]]></add>
</operation>
</file>
<file name="$themedir/languages/Help.brazilian.php" error="skip">
<operation>
<search position="before"><![CDATA[
$helptxt = array();
]]></search>
<add><![CDATA[

// Help for the Site Integration Mod
$helptxt['integrationmod_site_includes_folders'] = 'Esta configuração permite a você adicionar várias pastas, por que os separam por vírgulas. Todas as situações. Php esses arquivos em pastas serão convertidas em acções através da SMF.<br/><br/>Observe que a pasta nomes são relativos à SMF diretório home. (eg. \'file_includes\' will load actions from \'(SMF Home Directory)/file_includes/\')<br/><br/>Note também que não importa se você usar barras no início ou no fim da pasta nomes, eles estão no meio nessesary porém se você estiver tentando carregar uma subpasta (eg. \'file_includes/files\').';

]]></add>
</operation>
</file>



modification

<file name="$themedir/languages/Modifications.portuguese-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[

// Site Integration Text.
$txt['integrationmod_generalsettings_heading'] = 'P&#225;ginas em Geral integra&#231;&#227;o configura&#231;&#245;es';
$txt['integrationmod_tab_heading'] = 'P&#225;gina Integra&#231;&#227;o';
$txt['integrationmod_site_includes_folders'] = 'Arquivo / ac&#231;&#227;o incluem pastas:';

]]></add>
</operation>
</file>
<file name="$themedir/languages/Modifications.brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[

// Site Integration Text.
$txt['integrationmod_generalsettings_heading'] = 'P&#225;ginas em Geral integra&#231;&#227;o configura&#231;&#245;es';
$txt['integrationmod_tab_heading'] = 'P&#225;gina Integra&#231;&#227;o';
$txt['integrationmod_site_includes_folders'] = 'Arquivo / ac&#231;&#227;o incluem pastas:';

]]></add>
</operation>
</file>



Nathaniel

Thank you for translating it, :)

I will add aditional translations when I do another version.

Any comments or suggestions?
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.

_Anthony_

I do not understand.
Please tell me how this modification works.
And if they wanted to integrate the site with the forums could they not just use the functions in SSI.php?

Eliana Tamerin

Wow, how did I manage to miss this?

* Eliana Tamerin bugs the customization team to sort by approval date instead of submission date again.

Sounds like a great concept. I look forward to seeing some people integrate their normal HTML sites with SMF without having to know loads of php.
Do NOT PM me for support.

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

Nathaniel

Quote from: MrMoney on April 30, 2008, 07:13:32 PM
I do not understand.
Please tell me how this modification works.

I am sorry if my explanation is a little bit complicated, I will try to work on it.

This Mod creates a setting in the "features and settings" ("modifications" for smf 2 beta) part of the admin section, which allows you to make a list of folders. Every '.php' file from each of these folders will be added as an action into the SMF system, allowing for easier integration. To access the action for a particular file you type in "index.php?action=(filename without the trailing '.php')".

Quote from: MrMoney on April 30, 2008, 07:13:32 PM
And if they wanted to integrate the site with the forums could they not just use the functions in SSI.php?

Yes, this Mod performs a similar task to the SSI.php functions, except that it is much easier to setup and means that people don't have to worry about calling certain functions or learning how to use the functions. It also means that your entire site looks fully integrated with SMF because it uses the SMF action system, ie index.php?action=(filename without the trailing '.php').

This Mod was also going to originally have a Custom Menu system, which would have included custom permissions for actions, but I have spilt that into another Mod which I should complete in a week or two.

As I have already said, I am planning to put in some more usefull integration settings, such as login/logout redirect actions and etc. Any suggestions as to useful features for integration that you think this Mod could have would be most welcome.

The general idea of this Mod is that its easy to use, much easier than the SSI.php method.

Thank you for your comments.
:)

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.

Apllicmz

You can do a demo and that which are pages which supports .. because I am using joomla and possibly



_Anthony_


Nathaniel

May 01, 2008, 03:57:47 AM #8 Last Edit: May 01, 2008, 04:00:32 AM by LHVWB
Demo is located at www.verbtest.com

All I had to do to setup the demo, was to install the Mod, upload some files to the /demo folder, and then type 'demo' for the folder includes setting.

Easy!  ;)
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.

Apllicmz

It works so with version 2.0



Nathaniel

May 01, 2008, 05:12:48 AM #10 Last Edit: May 01, 2008, 05:15:17 AM by LHVWB
* Updated

v1.13. Changes:
Added Portugues and Brazilian thanks to joomlamz.
Updated the Mod to work with SMF 1.1.5.

It will still works perfectly with SMF 1.1.4,

I have made a SMF 1.1.5 demo at http://www.verbtest.com/smfdemo/

joomlamz, you didn't post any non-utf8 "language.modifications.php" translation so I just copied the utf-8 ones, could you please post back if this is a problem.

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.

damnitmike

This mod has me interested....but when I go to the demo, all I see is a page of code....

It looks like it is trying to show a file, but permissions don't allow it???

Do you need to be logged in to see it???

I'll keep watching this mod......it looks like it has some nice possibilities.


Apllicmz

thank You Update Now

<file name="$themedir/languages/Modifications.portuguese.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[

// Site Integration Text.
$txt['integrationmod_generalsettings_heading'] = 'Paginas em Geral integração configurações';
$txt['integrationmod_site_includes_folders'] = 'Ficheiro/acção incluem pastas:';

]]></add>
</operation>
</file>
<file name="$themedir/languages/Modifications.brazilian.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[

// Site Integration Text.
$txt['integrationmod_generalsettings_heading'] = 'Paginas em Geral integração configurações';
$txt['integrationmod_site_includes_folders'] = 'Ficheiro/acção incluem pastas:';

]]></add>
</operation>
</file>



Nathaniel

Changes:
I have improved the clarity of my explanations about the Mod on the Mod page. I have also update the Mod to version 1.2 which includes the language include options that allow the actions/files to have multi-language support much more easily. Below is an example of how this could work.

Example website settings.
File/Action Include Folders:  'action_includes'
Language File Include Folders: 'language_includes'
Site-Wide Language Integration Files: 'site_language_support'

I have two files in the 'action_includes' folder:
"demo.php"

<?php
echo($general_text);
echo(
$demo_text);
?>


"demo2.php"

<?php
echo($general_text);
echo(
$demo_text);
?>


I have six files in the 'language_includes' folder:

"demo.english.php".

<?php
$demo_text 
"English Demo1 text.";
?>


"demo.french-utf8.php".

<?php
$demo_text 
"French Demo1 text.";
?>


"demo2.english.php".

<?php
$demo_text 
"English Demo2 text.";
?>


"demo2.french-utf8.php".

<?php
$demo_text 
"French Demo2 text.";
?>


"site_language_support.english.php".

<?php
$general_text 
"English General Site Language Support text.";
?>


"site_language_support.french-utf8.php".

<?php
$general_text 
"French General Site Language Support text.";
?>


When I load the actions with the english language these are the outputs:

"index.php?action=demo"
Quote
English General Site Language Support text.
English Demo1 text.

"index.php?action=demo2"
Quote
English General Site Language Support text.
English Demo2 text.

When I load the actions with the french-utf8 language these are the outputs:

"index.php?action=demo"
Quote
French General Site Language Support text.
French Demo1 text.

"index.php?action=demo2"
Quote
French General Site Language Support text.
French Demo2 text.


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

May 05, 2008, 11:16:19 PM #14 Last Edit: May 05, 2008, 11:18:08 PM by LHVWB
Sorry joomlamz, because I have added more text to the Mod there is more to translate. If anyone wants to add any translations to the mod then the langauge strings are below.

<file name="$themedir/languages/Modifications.english.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[

// Site Integration Mod Text.
$txt['integrationmod_generalsettings_heading'] = 'General Site Integration Settings';
$txt['integrationmod_tab_heading'] = 'Site Integration';
$txt['integrationmod_site_includes_folders'] = 'File/Action Include Folders:';
$txt['integrationmod_site_language_includes_folders'] = 'Language File Include Folders:';
$txt['integrationmod_site_general_language_files'] = 'Site-Wide Language Integration Files:';

]]></add>
</operation>
</file>
<file name="$themedir/languages/Help.english.php" error="skip">
<operation error="skip">
<search position="before"><![CDATA[
$helptxt = array();
]]></search>
<add><![CDATA[

// Help for the Site Integration Mod
$helptxt['integrationmod_site_includes_folders'] = 'This settings allows you to add multiple folders, by separating them with commas. All of the .php files in those folders will be turned into actions by SMF.<br/><br/>Please Note that the folder names are relative to the SMF home directory. (eg. \'file_includes\' will load actions from \'(SMF Home Directory)/file_includes/\')<br /><br />Also Note that it doesn\'t matter if you use forward slashes at the beginning or end of the folder names, they are however nessesary in the middle if you are trying to load a subfolder (eg. \'file_includes/files\').';
$helptxt['integrationmod_site_language_includes_folders'] = 'If your site only uses one language then ignore this option. <br /><br />This settting allows you to make a list of folders, separated by commas. When you view one of the actions/files loaded by this Mod using the previous setting, SMF will search through these folders for any language include files, in a way similar to the inbuilt SMF language system.<br /><br />First it will search for a specific language file for the current action (ie. "(current action).(User\'s current SMF language).php"). For example, when the action is \'demo\' and the langauge is \'english-utf8\' it will look for \'demo.english-utf8.php\'.<br /><br /> It will also search for any general site-wide language include files in these folders (refer to the next setting). <br /><br /> Within the actual language files themselves, you can declare string variables that you can then use in your action to make your actions have multiple language translations.';
$helptxt['integrationmod_site_general_language_files'] = 'If your site only uses one language then ignore this option. <br /><br />This setting allows you to add a series of general site-wide language includes, separated by commas. When the system searches through your language include folders (refer to above setting), it will always include language files which have this prefix, no matter which action you are viewing.<br /><br /> For example, when the language is french-utf8 and the action is demo, but you have set a general language include called \'sitelanguage\', it will look for and include \'demo.french-utf8.php\' and \'sitelanguage.french-utf8.php\'. <br /><br /> Setting variables and using them works exactly the same for these site-wide language includes, as for the language includes discussed in the previous settings help pop-up.';

]]></add>
</operation>
</file>


Quote from: damnitmike on May 01, 2008, 10:35:26 AM
This mod has me interested....but when I go to the demo, all I see is a page of code....

It looks like it is trying to show a file, but permissions don't allow it???

Do you need to be logged in to see it???

I'll keep watching this mod......it looks like it has some nice possibilities.


damnitmike,

I am not entirely sure what you are refering to. The page which is link as the demo is meant to show some code as example to show you how to protect your pages and etc.
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.

Apllicmz

May 06, 2008, 12:42:51 AM #15 Last Edit: May 06, 2008, 11:04:52 PM by joomlamz
Thank you  now try o translate to see how she work...

try to see in attach Portuguese and brazilian.xml



Edit: Update Now Thank you



Nathaniel

May 06, 2008, 02:44:23 AM #16 Last Edit: May 06, 2008, 03:54:14 AM by LHVWB
Okay, thanks joomlamz.

I have updated the Mod with support for brazilian and portuguese. The edits in the brazilian.xml file that you sent me were editing the portuguese files, I changed them to brazilian. They are both in the additional_languages.xml file in my mod.

I don't have time to test it at the moment, I will probably test it with those languages in a few hours.

Thank you for the translations.

Edit: I did some testing and it appears that some of the translations are still in english. Could you please fix this and then re-post them?
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.

Eclipse16V

How can Guests see any site?

When an Guest click on an page, hi must be log in.
I worked with:
SMF 2 in German

Shop:
SID Giessen

Nathaniel

I can't completely understand what you are trying to say, but if you want to retrict user access to any of these mod pages then you can do it using the allowedTo() function.
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.

Eclipse16V

Rear one, yes and as I installation? Where? What? I want to be able to see that guests certain sides and other sides only for user am visible. Thanks
I worked with:
SMF 2 in German

Shop:
SID Giessen

Advertisement: