collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 386
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: Board News Block Setting up News  (Read 6375 times)

0 Members and 1 Guest are viewing this topic.

Offline [dx]

  • Semi Newbie
  • *
  • Posts: 10
Board News Block Setting up News
« on: November 20, 2008, 09:54:50 PM »
Hi there :)

I was wondering if somehow can be done that those Topic Names from Board News Block can be written in news base.

So let say, for example:

I choose to show 10 topics in board news block and each topic name is written to news db. Hope you understand what I'm saying about.

Later i'll use news in <marquee> to scrool latest news :]

Thanks in advance.

Offline bvs

  • Semi Newbie
  • *
  • Posts: 11
  • Gender: Male
Re: Board News Block Setting up News
« Reply #1 on: November 21, 2008, 10:12:44 AM »
I have done it using a PHP Block by placing a call to "board news" block  between marquee tag.

 sp_boardnews(32.0); 

As I use one board exclusively for the latest news, I don't have to filter it further. 

Hope this would help you
 
 :)

cheers!


God is good, all the time :)

Offline [dx]

  • Semi Newbie
  • *
  • Posts: 10
Re: Board News Block Setting up News
« Reply #2 on: November 21, 2008, 10:45:02 AM »
Not really, can you show me your script

Offline bvs

  • Semi Newbie
  • *
  • Posts: 11
  • Gender: Male
Re: Board News Block Setting up News
« Reply #3 on: November 21, 2008, 10:57:26 AM »
other than the call to sp_boardnews function which is part of SP standard functions, the remaing code is for the marquee. Please note that  I found the HTML version of  this marquee script at  www.dynamicdrive.com and had to convert to pure PHP to put it in a PHP block.

Code: [Select]
echo "<style type='text/css'>";
echo "";
echo "#marqueecontainer{";
echo "position: relative;";
echo "width: 200px; /*marquee width */";
echo "height: 200px; /*marquee height */";
echo "background-color: white;";
echo "overflow: hidden;";
echo "border: 3px solid orange;";
echo "padding: 2px;";
echo "padding-left: 4px;";
echo "}";
echo "";
echo "</style>";
echo "";
echo "<script type='text/javascript'>";
echo "";
echo "/***********************************************";
echo "* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)";
echo "* This notice MUST stay intact for legal use";
echo "* Visit http://www.dynamicdrive.com/ for this script and 100s more.";
echo "***********************************************/";
echo "";
echo "var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)";
echo "var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)";
echo "var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?";
echo "";
echo "////NO NEED TO EDIT BELOW THIS LINE////////////";
echo "";
echo "var copyspeed=marqueespeed";
echo "var pausespeed=(pauseit==0)? copyspeed: 0";
echo "var actualheight=''";
echo "";
echo "function scrollmarquee(){";
echo "if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))";
echo "cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+'px'";
echo "else";
echo "cross_marquee.style.top=parseInt(marqueeheight)+8+'px'";
echo "}";
echo "";
echo "function initializemarquee(){";
echo "cross_marquee=document.getElementById('vmarquee')";
echo "cross_marquee.style.top=0";
echo "marqueeheight=document.getElementById('marqueecontainer').offsetHeight";
echo "actualheight=cross_marquee.offsetHeight";
echo "if (window.opera || navigator.userAgent.indexOf('Netscape/7')!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit";
echo "cross_marquee.style.height=marqueeheight+'px'";
echo "cross_marquee.style.overflow='scroll'";
echo "return";
echo "}";
echo "setTimeout('lefttime=setInterval('scrollmarquee()',30)', delayb4scroll)";
echo "}";
echo "";
echo "if (window.addEventListener)";
echo "window.addEventListener('load', initializemarquee, false)";
echo "else if (window.attachEvent)";
echo "window.attachEvent('onload', initializemarquee)";
echo "else if (document.getElementById)";
echo "window.onload=initializemarquee";
echo "";
echo "";
echo "</script>";
echo "";
echo "<div id='marqueecontainer' onMouseover='copyspeed=pausespeed' onMouseout='copyspeed=marqueespeed'>";
echo "<div id='vmarquee' style='position: absolute; width: 98%;'>";
echo "";
echo "<!--YOUR SCROLL CONTENT HERE-->";
echo "";
echo "<h4>Your scroller contents</h4>";
echo "This is just for testing ,,";
sp_boardnews(32.0);
echo "<!--YOUR SCROLL CONTENT HERE-->";
echo "";
echo "</div>";
echo "</div>";
echo "";
echo "";

Good luck!
God is good, all the time :)

Offline [dx]

  • Semi Newbie
  • *
  • Posts: 10
Re: Board News Block Setting up News
« Reply #4 on: November 21, 2008, 11:29:57 AM »
I've searched in ManagaNews.php file from Source folder and found this

updateSettings(array('news' => implode("\n", $_POST['news'])));

Could be used in New Block when reading last news to update or something.

Any help :)

Offline ibm450

  • Semi Newbie
  • *
  • Posts: 49
  • Gender: Male
    • yarrie health & safety
Re: Board News Block Setting up News
« Reply #5 on: November 21, 2008, 07:14:11 PM »
dosnt scroll, whats it meant to do??

Offline [dx]

  • Semi Newbie
  • *
  • Posts: 10
Re: Board News Block Setting up News
« Reply #6 on: November 23, 2008, 10:53:43 AM »
dosnt scroll, whats it meant to do??

What?

----------------

So, something can be done with setting up news?

Regards

Offline [dx]

  • Semi Newbie
  • *
  • Posts: 10
Re: Board News Block Setting up News
« Reply #7 on: December 07, 2008, 05:01:15 AM »
Something about?

Offline [dx]

  • Semi Newbie
  • *
  • Posts: 10
Re: Board News Block Setting up News
« Reply #8 on: December 17, 2008, 08:40:21 AM »
Bump.