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

@sinnie,
Those blues that you can see are images. You can look for css code like "url(web location)" in your style.css file to change the images you use. But there is more to it, I suggest that you ask about it in the Graphics and Template forum.
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.

dwd2000

Quote from: LHVWB on June 08, 2008, 06:08:29 AM
This mod is not designed to integrate entire software packages into SMF, so it may have some odd results...

This is what I was hoping this mod would do.
I have a "website promotion" site which has or will have several scripts to help promote websites.
(web ring, banner exchange, link exchange, etc.)
The development of the site is taking a backseat because I'm working on one of my other sites which is now using SMF.

Are there any plans for this type of integration?
Maybe it would be easier to request separate mods for each type of script?
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Nathaniel

@dwd2000,
It really depends on how huge the scripts are, if you are talking about integrating a script that normally requires its own folder on your website, and has 40 or more parts to it, such as a forum, CMS, or etc. then it probably wouldn't work. It also depends, if you are using your own member system with the scripts, or if you want to use the SMF member system. However, if you are merely trying to integrate a few relatively small scripts then it should be possible.

If you are trying to integrate huge scripts then you should ask about them in this forum:
http://www.simplemachines.org/community/index.php?board=33.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.

dwd2000

Quote from: LHVWB on August 15, 2008, 02:13:38 AM
@dwd2000,
It really depends on how huge the scripts are, if you are talking about integrating a script that normally requires its own folder on your website, and has 40 or more parts to it, such as a forum, CMS, or etc. then it probably wouldn't work. It also depends, if you are using your own member system with the scripts, or if you want to use the SMF member system. However, if you are merely trying to integrate a few relatively small scripts then it should be possible.

If you are trying to integrate huge scripts then you should ask about them in this forum:
http://www.simplemachines.org/community/index.php?board=33.0

Yes, each script has its own folder.
No, it's not like a CMS.
I would use the forums that are included with SMF.
If it's possible, I would use the SMF membership system.
Script examples:
Banner exchange, link exchange, web ring, etc.

Each script has it's own CSS, etc., so I could see that as a problem. (unless I want to go through every script and make the changes)

I have also posted this as a mod request, hoping someone might develop website promotion mods for SMF.

Thanks for your reply.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

xyber9

I'm sorry, but I'm still not understanding how this mod works  :(
I've installed the package into my site, but I don't know where to begin modifying stuff. or rather, "what" to modify.
Please if anyone doesn't mind helping me I'd be very appreciative :)
Thanks in advanced.

xyber9

Nathaniel

@dwd2000,
It should be possible, you will just need to do some work on it.

@xyber9,
First thing you need to do, is to add a "File Include Folder" to the setting in the admin area, then you will need to add some files to it so that they are included as actions. Remember that this mod, will include your files, as actions in SMF. So that you can access them at "index.php?action=blah", if the included file was called blah.php, blah.html or 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.

xyber9

Thanks for the reply :) I think I'm understanding a little better now, so say I want to add games to my site, I create a File/Action Include Folders named "GAMES" and in Extra "File/Action Include" File Extensions i put the name of the php, htm etc. file. Is this correct? :)

Nathaniel

No, in the "Extra "File/Action Include" File Extensions" setting, you can put the file extensions, like '.html', '.txt', '.me', '.doc' and etc. By default, the mod will include all '.php' files from the folders that you specify, however if you want to use .html or .htm or etc, you will have to add them to the setting.

The mod will automatically include the files, then you can manage them within the admin area. Remember that you will need to change the permissions for each included file/action (by clicking on the manage link next to each included file/action), before anybody apart from the admin will be able to see 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.

xyber9

I see. Wow It's working well! I think I'll change my complete site into a board! In fact, that's what I'm doing now, lol ,sorry for not posting sooner. :-[ Ok one more question, is there a way to center the extension, or can it only be aligned to the left? If it's simply changing the html I know how to do that, but still learning php, oh and the extension is in html.

Nathaniel

Well, if you know where to look. You can actually completely remove the box that the mod puts around the pages/files that are included.

The file you will need to edit is the "themes/default/SiteIntegration.template.php" file, you want to edit the "template_SiteIntegration()" function, the code you will need to edit, looks like this:
function template_SiteIntegration()
{
   global $context;
      //   Show a display box for the included page.
   echo'
   <div class="tborder" style="margin-top: 1ex;">
      <div style="padding: 2ex;" id="helpmain">
      ';

      //   Include the page.
      require_once($context['file_include']);
     
   //   End the display box.
   echo '
      </div>
   </div>
   ';
}


To align the contents of the included pages/files left, you can replace the code above with this code:
function template_SiteIntegration()
{
   global $context;
      //   Show a display box for the included page.
   echo'
   <div class="tborder" style="margin-top: 1ex;">
      <div style="padding: 2ex;text-align:center;" id="helpmain">
      ';

      //   Include the page.
      require_once($context['file_include']);
     
   //   End the display box.
   echo '
      </div>
   </div>
   ';
}


Please note that changing the html like that, by adding "text-align:center;" to that function will alter how every one of your pages is shown, you could also just use code like this, and have a slightly different box in each included page/file.
function template_SiteIntegration()
{
    global $context;

       //   Include the page.
       require_once($context['file_include']);
       
}
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.

xyber9

Ok, nice   it's working. :D Everything seemed to be going good until this morning when I logged on to my site under a different name just to test the board, and I can't open some of the links, they just send me back to the index. I've attempted to change the permissions through the Site Integration tabs, but when I go back to change the permissions and save them they just stay the same. :( Two of the links allow me to change the permissions, but the rest won't save the changes. While I'm not sure why this is I was just wondering if there was a way to change the permissions manually through the SiteIntegration.template.php or something like that? Oh and I have change the permissions of the files themselves manually, I put everything on 777 thinking that it would allow users to see the files, but it still doesn't. So I'm pretty much lost now, lol.   :-\

Nathaniel

Firstly, which version of SMF do you have?

There is no way to save the changes through the 'SiteIntegration.template.php' file, the permissions are done through the mod and should work. ;)

The only suggestion that I can make, is that when you click manage for a particular file/action, and then change the permissions checkboxes for it, you have to click the 'Save' button as opposed to going "Back To General Settings", because otherwise it shouldn't save.

If you can tell me your version and maybe any other mods you have installed, then I should be able to investigate it.
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.

xyber9

Thanks for replying :)
I'm currently using smf 1.1.5 and these are the only mods I'm using:
1.     Skype Integration      1.0
2.     Ultimate Profile      0.8.5
3.     Site Integration Mod      1.4
Everything else seems to be working well, just the saving part, you can look at the site here:
http://2liveonline.com [nofollow]
:D

Nathaniel

Hmm, none of those mods should be effecting how the Site Integration Mod works, did you have any install errors when you installed the mod? Are there any errors in your error log?
Forum Error Log
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.

xyber9

 :D :D :D :D
lol! I found the problem (and solution!!!)
I've just checked the error log like you told me and I had like 100 errors in just a couple of days. A few were from other logs, but the bulk of the logs were for "SiteIntegrationMod_tab_heading" found in "/Sources/ModSettings.php" on Line: 138 (which is probably different from everyone.) I remember you saying that there was nothing to change internally, then I began looking at my links... The two links working for everyone were single word links, while the others that weren't working had three words in them per link i.e.=
GAMES.html WORKS FINE but GAME SECTION.html didn't work at all. So I put two and two together (not by my own power mind you) and remembered from years ago that without an underscore the links in php wouldn't work, lol nice timing hugh? Anyway I combined the words and viola! All the links work! :D  :D So I'm good to go now, with a relieved mind ready to officially run my site (I've had so many unofficial releases in the past that it's sad!)
So THANK YOU!!! For taking out time to help me out. GOD most definitely had you here for mea!!!
;)  2liveonline.com [nofollow] is Fully Functional And Ready 2 go!!!

Nathaniel

@xyber9,
Glad to hear it.

I had actually come accross that problem before, but its a difficult one to diagnose. Nice work! :D

I'll try to add a note about that to the documentation so that it doesn't happen to anyone in the future.

Good luck with the site. ;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.

xyber9

Thanks! I guess we both learned something (*scratches head still confused a little)
:D
Of course you helped me out waaaay more, I just fiddled around a little, lol
But thanks!  :D
I've got high expectations outta the site, and with GOD on my side... nothing is impossible!

I just believe it!  :D :D :D

Panache Web

so how would I make it so it does not say unknown action on the who's online list?


Nathaniel

@dcd119,
Step by Step method:
1) Put a string into the 'Language String Prefix' setting, something like 'site_'.
2) Check the 'Show in Whosonline list?' setting for each included file/action that you want to be shown.
3) Add a '$txt['site_{Title of Included action.file}']' string for every included file/action that you want to add. You have to add your own language strings into the $txt variable. You can do this either by adding them into your 'modifications.english.php' file at the beginning, or by creating your own language files (see the 'Language File Include Folders' setting).

Example:
You have three included actions with the titles 'home', 'demo' and 'evil'. You have set the 'Language String Prefix' setting to 'site_'.

$txt['site_home'] = 'Home';
$txt['site_demo'] = 'Demo';
$txt['site_evil'] = 'Mahahahaha';


I hope that that explanation makes it clear enough, if not then I can help you with anything that you didn't understand. ;)
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.

Panache Web

I am getting this error, I am not sure what it is from.

Duplicate entry '18-SiteIntegration:rosteraddmembe' for key 1
File: /home/ggate/public_html/Sources/ManagePermissions.php
Line: 1819

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0 Beta 3.1 Public, while your database is at version 2.0 Beta 3 Public. The above error might possibly go away if you execute the latest version of upgrade.php.

should I overrwrite all the core files?

Advertisement: