Author Topic: [SMF 1.1.X HELP] Configuring SimplePortal module  (Read 1247 times)

0 Members and 1 Guest are viewing this topic.

Offline Underdog

  • New Member
  • *
  • Posts: 98
  • Karma: 476
  • Gender: Male
  • SMF/Games Helper
    • Ask Us A Question
  • SMF Version: 2.0 Rc1.2
[SMF 1.1.X HELP] Configuring SimplePortal module
« on: July 05, 2009, 10:06:32 PM »
Hello again..

I just installed SimplePortal for my site and I am not clear how to go about getting it set up the way I wish. ???

I noticed this on a lot of sites, including this one..

For example: On this site..

The portal is set up on http://www.smfhelper.info/ or http://www.smfhelper.info/indexphp/ and the forum page is set up on...
http://www.smfhelper.info/forum/ ..
After installing this mod I am able to have it turn on as the home page but I don't seem to be able to edit a button from the top or add a forum redirect to one of the blocks such as I see on this site. In fact - with the SimplePortal turned on I don't seem to be able to display my regular forum setup at all. :shckd
How do I go about doing this?

Secondly... I have aeva installed on my forum and would like to know if it is possible to add a welcome page with SimplePortal that displays some imbedded flash?

Thanks.
« Last Edit: July 06, 2009, 12:43:11 AM by Underdog »

Offline Chit-Chat ChatterBox Boss

  • Sr. Member
  • *
  • Posts: 314
  • Karma: 741
  • Gender: Male
  • SMF Helper's noob helper...I mean friendly helper!
    • Chit-Chat ChatterBox
  • SMF Version: 2.0 RC1-1
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #1 on: July 05, 2009, 10:43:23 PM »
If you know how to create buttons(tabs) all you need to do is add one after home called 'Forum" and have it point to your site page that the main page of the forum is on. I do know in 2.0 rc1-1 you do this in subs.php for 1.1.X I forgot which file they do this on. I know on simplemachines.org (smf) they do say how to add and remove tabs for 1.1.x I would just have to look myself to remember for 1.1.X. So either wait for a response or look on simplemachines (smf) to see how to add it. It is VERY easy just forgot the file.

Found this:
http://docs.simplemachines.org/index.php?topic=564

Will continue to look for more.

Offline Underdog

  • New Member
  • *
  • Posts: 98
  • Karma: 476
  • Gender: Male
  • SMF/Games Helper
    • Ask Us A Question
  • SMF Version: 2.0 Rc1.2
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #2 on: July 06, 2009, 12:42:53 AM »
Ok... I have the Forum button installed and working properly.
Not exactly how the tutorial explained, but it gave me the basic idea and was easy to figure out.

Thanks a bunch!  :vic

I'll have to mess around with the portal page to get it to look good now. I see I can add my own scripts so I will have to experiment with specific features that I want.
 


Offline Chit-Chat ChatterBox Boss

  • Sr. Member
  • *
  • Posts: 314
  • Karma: 741
  • Gender: Male
  • SMF Helper's noob helper...I mean friendly helper!
    • Chit-Chat ChatterBox
  • SMF Version: 2.0 RC1-1
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #3 on: July 06, 2009, 12:48:25 AM »
Yes SP can be HIGHLY configured any way you want. You can have it display blocks on other pages too (any that you want) not just the Portal!

Offline Underdog

  • New Member
  • *
  • Posts: 98
  • Karma: 476
  • Gender: Male
  • SMF/Games Helper
    • Ask Us A Question
  • SMF Version: 2.0 Rc1.2
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #4 on: July 06, 2009, 01:06:21 AM »

I noticed that the news bar on the portal page doesn't fade. I have several but it just displays only one of the news lines.
Is that normal for this add on package?

Offline ccbtimewiz

  • Dreamer
  • Guru
  • *
  • Posts: 1304
  • Karma: 2100
  • Gender: Male
  • $info->close();
    • Dream Portal
  • SMF Version: SMF 2.0 RC4
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #5 on: July 06, 2009, 01:16:00 AM »
It is intended, yes.

Offline Chit-Chat ChatterBox Boss

  • Sr. Member
  • *
  • Posts: 314
  • Karma: 741
  • Gender: Male
  • SMF Helper's noob helper...I mean friendly helper!
    • Chit-Chat ChatterBox
  • SMF Version: 2.0 RC1-1
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #6 on: July 06, 2009, 02:03:19 AM »
To make a fading news on the SP do this. Create a 'Custom PHP' block and make the title w/e you want. Add this to the 'Custom PHP' code area:

:
   global $context, $settings;

   echo '
                        <div id="smfNewsFader"><div id="smfFadeScroller" class="sp_center sp_fullwidth"><span>', $context['news_lines'][0], '</span></div></div>
                  <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                     // The fading delay (in ms.)
                     var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
                     // Fade from... what text color? To which background color?
                     var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
                     // Surround each item with... anything special?
                     var smfFadeBefore = "<b>", smfFadeAfter = "</b>";

                     var foreColor, foreEl, backEl, backColor;

                     if (typeof(document.getElementById('smfFadeScroller').currentStyle) != "undefined")
                     {
                        foreColor = document.getElementById('smfFadeScroller').currentStyle.color.match(/#([da-f][da-f])([da-f][da-f])([da-f][da-f])/);
                        smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

                        backEl = document.getElementById('smfFadeScroller');
                        while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
                           backEl = backEl.parentNode;

                        backColor = backEl.currentStyle.backgroundColor.match(/#([da-f][da-f])([da-f][da-f])([da-f][da-f])/);
                        smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
                     }
                     else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
                     {

                        foreEl = document.getElementById('smfFadeScroller');

                        while (document.defaultView.getComputedStyle(foreEl, null).getPropertyCSSValue("color") == null && typeof(foreEl.parentNode) != "undefined" && typeof(foreEl.parentNode.tagName) != "undefined")
                           foreEl = foreEl.parentNode;

                        foreColor = document.defaultView.getComputedStyle(foreEl, null).getPropertyValue("color").match(/rgb((d+), (d+), (d+))/);
                        smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

                        backEl = document.getElementById('smfFadeScroller');

                        while (document.defaultView.getComputedStyle(backEl, null).getPropertyCSSValue("background-color") == null && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
                           backEl = backEl.parentNode;

                        backColor = document.defaultView.getComputedStyle(backEl, null).getPropertyValue("background-color");//.match(/rgb((d+), (d+), (d+))/);
                        smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
                     }

                     // List all the lines of the news for display.
                     var smfFadeContent = new Array(
                        "', implode('",
                        "', $context['fader_news_lines']), '"
                     );
                  // ]]></script>
                  <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>';

Oh crap ... forgot your on crapy 1.1.x .... you can test it out ... but this paticular code is used for 2.0 rc1-1
« Last Edit: July 06, 2009, 02:18:39 AM by Chit-Chat ChatterBox Boss »

Offline Underdog

  • New Member
  • *
  • Posts: 98
  • Karma: 476
  • Gender: Male
  • SMF/Games Helper
    • Ask Us A Question
  • SMF Version: 2.0 Rc1.2
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #7 on: July 06, 2009, 04:52:32 PM »
 :no
Parse error:  syntax error, unexpected T_STRING, expecting ',' or ';' in /home/askusaqu/public_html/Sources/SPortal1-1.php(3319) : eval()'d code on line 15

... What template is it in for the regular forum??
Why don't I just copy the routine from there?

//Edit

Found it...
[/]
:
  // Show the news fader?  (assuming there are things to show...)

   if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))

   {

      echo '

   <table border="0" width="100%" class="tborder" cellspacing="' , ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' : '0' , '" cellpadding="4" style="margin-bottom: 2ex;">

      <tr>

         <td class="catbg">  ', $txt[102], '</td>

      </tr>

      <tr>

         <td valign="middle" align="center" height="60">';



      // Prepare all the javascript settings.

      echo '

            <div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>', $context['news_lines'][0], '</b></div>

            <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

               // The fading delay (in ms.)

               var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';

               // Fade from... what text color? To which background color?

               var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};

               // Surround each item with... anything special?

               var smfFadeBefore = "<b>", smfFadeAfter = "</b>";



               var foreColor, backEl, backColor;



               if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")

               {

                  foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);

                  smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};



                  backEl = document.getElementById(\'smfFadeScroller\');

                  while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")

                     backEl = backEl.parentNode;



                  backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);

                  smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};

               }

               else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")

               {

                  foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);

                  smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};



                  backEl = document.getElementById(\'smfFadeScroller\');

                  while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")

                     backEl = backEl.parentNode;



                  backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);

                  smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};

               }



               // List all the lines of the news for display.

               var smfFadeContent = new Array(

                  "', implode('",

                  "', $context['fader_news_lines']), '"

               );

            // ]]></script>

            <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>

         </td>

      </tr>

   </table>';

   }

Doesn't seem to work when added as php or html.


« Last Edit: July 06, 2009, 05:14:00 PM by Underdog »

Offline AST3R1X

  • V.I.P.
  • *
  • Posts: 1210
  • Karma: 1002
  • Gender: Male
    • Demon Pixels
  • SMF Version: SMF 2.0 Gold
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #8 on: July 06, 2009, 05:02:37 PM »
For 1.1.x use this code

:
   global $context, $settings;

   echo '
                        <div id="sp_news_fader_', $id, '" class="sp_center sp_fullwidth"><b>', $context['news_lines'][0], '</b></div>
                        <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                           // The fading delay (in ms.)
                           var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
                           // Fade from... what text color? To which background color?
                           var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
                           // Surround each item with... anything special?
                           var smfFadeBefore = "<b>", smfFadeAfter = "</b>";

                           var foreColor, backEl, backColor;

                           if (typeof(document.getElementById(\'sp_news_fader_', $id, '\').currentStyle) != "undefined")
                           {
                              foreColor = document.getElementById(\'sp_news_fader_', $id, '\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
                              smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

                              backEl = document.getElementById(\'sp_news_fader_', $id, '\');
                              while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
                                 backEl = backEl.parentNode;

                              backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
                              smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
                           }
                           else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
                           {
                              foreColor = document.defaultView.getComputedStyle(document.getElementById(\'sp_news_fader_', $id, '\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
                              smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

                              backEl = document.getElementById(\'sp_news_fader_', $id, '\');
                              while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
                                 backEl = backEl.parentNode;

                              backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
                              smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
                           }

                           // List all the lines of the news for display.
                           var smfFadeContent = new Array(
                              "', implode('",
                              "', $context['fader_news_lines']), '"
                           );
                        // ]]></script>
                        <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>
                        <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                           smfFadeScroller = document.getElementById(\'sp_news_fader_', $id, '\');
                        // ]]></script>';

Offline Underdog

  • New Member
  • *
  • Posts: 98
  • Karma: 476
  • Gender: Male
  • SMF/Games Helper
    • Ask Us A Question
  • SMF Version: 2.0 Rc1.2
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #9 on: July 06, 2009, 05:17:38 PM »
That worked!!  :great

Thank you.

Offline AST3R1X

  • V.I.P.
  • *
  • Posts: 1210
  • Karma: 1002
  • Gender: Male
    • Demon Pixels
  • SMF Version: SMF 2.0 Gold
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #10 on: July 06, 2009, 05:18:39 PM »
No worries Glad you got it sorted  ;)

Offline Chit-Chat ChatterBox Boss

  • Sr. Member
  • *
  • Posts: 314
  • Karma: 741
  • Gender: Male
  • SMF Helper's noob helper...I mean friendly helper!
    • Chit-Chat ChatterBox
  • SMF Version: 2.0 RC1-1
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #11 on: July 07, 2009, 07:32:10 AM »
Thanks bro for posting the 1.1.X version my stupid self forgot he is still using 1.1.x until After I got the 2.0 code  :doh

Offline AST3R1X

  • V.I.P.
  • *
  • Posts: 1210
  • Karma: 1002
  • Gender: Male
    • Demon Pixels
  • SMF Version: SMF 2.0 Gold
Re: [SMF 1.1.X HELP] Configuring SimplePortal module
« Reply #12 on: July 07, 2009, 11:47:17 AM »
No probs Chit Chat we are all here to help  ;)