collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 81
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • Jade Elizabeth: It's GREAT to see you too Sinan!! :D
    July 06, 2016, 02:33:26 am
  • [SiNaN]: Hey Jade! It's great to see you around! Jade!
    July 03, 2016, 06:51:31 am
  • Jade Elizabeth: Oops, sorry I mean HEY SINAN! ;)
    July 01, 2016, 11:07:13 am
  • Jade Elizabeth: Hey Sinan!! :D
    July 01, 2016, 11:06:59 am
  • [SiNaN]: But you shouldn't wait for a security issue and drop by more often. :D
    June 27, 2016, 04:32:18 pm
  • [SiNaN]: Hey ディン1031! It's great to see you around!
    June 27, 2016, 04:31:56 pm
  • ディン1031: Uh to long ago that i was last time here xD
    June 27, 2016, 02:03:08 pm
  • Schnuffeltier: :D
    June 24, 2016, 05:22:34 am
  • Jade Elizabeth: SHOUTBOX IS FOR SHOUTING AAAAAAHHHHHHHHHHH!!
    June 24, 2016, 12:57:05 am
  • [DFg]DJF-1975: Thank you, SP!
    June 21, 2016, 01:35:09 pm
  • Skhilled: phpBB is a good product but has a steeper learning curve.
    June 21, 2016, 08:19:04 am
  • ♦ Ninja ZX-10RR ♦: Hmm, not so sure about it, Eliana: [link]
    May 05, 2016, 02:03:02 am
  • Eliana Tamerin: That may have faded away now, or gotten better. I hope so. I see a lot of happy phpBB users, so I have to imagine someone is having success.
    April 25, 2016, 12:48:06 am
  • Eliana Tamerin: @andy, the phpBB folks had (at one point, not sure how it is now) a specific set of rules you had to follow to get support. Anyone not found doing so would have their topic ignored.
    April 25, 2016, 12:47:40 am
  • andy: SP team is a breath of fresh air...
    April 24, 2016, 11:24:32 pm
  • andy: Yes they are difficult to deal with at SMF. I never experienced anybody like that at phpbb several years ago.
    April 24, 2016, 11:24:03 pm
  • D.Va: Their team is very antagonistic and I prefer this forum and this staff far more. So kudos to SP for doing it right.
    April 24, 2016, 09:18:21 pm
  • andy: When SMF went gold there was a lot of optimism about progress and talk of 3.0.  Five years on and that soulds like SF.
    April 24, 2016, 08:37:31 pm
  • andy: Just my frustration at the slow pace of SMF. I suppose we have an alternative now.
    April 24, 2016, 08:34:38 pm
  • Burke Knight: Andy, as long as the SMF team keeps like they are doing, there's always going to be bugs, mainly due to SMF issues, because the team can't get their stuff straight.
    April 24, 2016, 08:25:41 pm

* Recent Posts

Re: Deleted block still showing!!! by Chen Zhen
[Yesterday at 11:48:52 am]


Re: Deleted block still showing!!! by habeycole
[July 28, 2016, 06:43:15 am]


Re: Deleted block still showing!!! by Chen Zhen
[July 27, 2016, 07:21:42 pm]


Re: Deleted block still showing!!! by ♦ Ninja ZX-10RR ♦
[July 27, 2016, 08:33:03 am]


Re: Deleted block still showing!!! by habeycole
[July 26, 2016, 10:49:54 am]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: [Tip] Post Notifications on shoutbox  (Read 13709 times)

0 Members and 1 Guest are viewing this topic.

Offline 130860

  • Super Handsome Language Coordinator
  • Comrade
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: [Tip] Post Notifications on shoutbox
« Reply #40 on: November 29, 2012, 04:34:39 pm »
any error on the error log? this code was made for an old version of SO, perhaps its different on new version, I haven't checked the new version.

weerforum

  • Guest
Re: [Tip] Post Notifications on shoutbox
« Reply #41 on: November 29, 2012, 04:36:52 pm »
No errors but just dont show up  ;)

Offline 130860

  • Super Handsome Language Coordinator
  • Comrade
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: [Tip] Post Notifications on shoutbox
« Reply #42 on: November 29, 2012, 04:40:27 pm »
Ok, lets put the query right after the call to createPost() then, not the best place but it should work.

weerforum

  • Guest
Re: [Tip] Post Notifications on shoutbox
« Reply #43 on: November 29, 2012, 04:47:41 pm »
No result grrrrrrrrrrrrrrrrrr

Offline phantomm

  • Translator
  • *
  • Posts: 395
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • SP Version: 2.4 (Elkarte)
  • Elkarte Version: 1.0.5
Re: [Tip] Post Notifications on shoutbox
« Reply #44 on: November 30, 2012, 10:12:55 am »
I tried to make it work with latest SP and code works partially - shouts are added in database, but shoutbox does not display them :|

Offline Chen Zhen

  • The Underdog
  • Support
  • *
  • Posts: 1218
  • Gender: Male
  • MOOSE KNUCKLES
    • WebDev
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
  • Elkarte Version: None
Re: [Tip] Post Notifications on shoutbox
« Reply #45 on: November 30, 2012, 03:18:12 pm »
  I have only very briefly looked at the edits to Post.php from this thread & can see some possible issues.

  • It is hard coded to only edit db data for shoutbox id#1
  • JS needed to implement shouts (client side/dynamic)

SP already has a function to add the shouts to the db and can be called instead of implementing the db edits I see in that file. Imo this is not the issue though.. it is possibly the shoutbox id# (if the user has set up more than 1 shoutbox) & the need for client side js.

Here is a brief example:
Code: [Select]
global $context;

$shout = 'This is a test shout';
$shout_id = 1;
$context['SPortal']['shoutbox'] = sportal_get_shoutbox($shout_id, true);

sportal_create_shout($context['SPortal']['shoutbox'], $shout);
echo '
<script language="Javascript" type="text/javascript"><!-- // --><![CDATA[
sp_submit_shout(', $shout_id, ', \'', $context['session_var'], '\', \'', $context['session_id'], '\');
// ]]></script>';

130860,
  The above uses shoutbox id#1 .. hard code that id#, another id# or create a drop-down option in SP admin menu to opt a specific shoutbox id#.  The sportal_create_shout & sportal_get_shoutbox functions should work without having to include any SP php file as it is already previously loaded/used by SP.

  One can just try adding the js after the db edits & it will probably work if that is the route opted.

« Last Edit: November 30, 2012, 04:20:26 pm by Underdog »

weerforum

  • Guest
Re: [Tip] Post Notifications on shoutbox
« Reply #46 on: February 05, 2013, 06:02:22 pm »
Didn`t work sorry ?
Not showing new post in te shoutbox

Any update ???
I love to see any post to show up in the shoutbox please

weerforum

  • Guest
Re: [Tip] Post Notifications on shoutbox
« Reply #47 on: March 03, 2013, 03:02:10 pm »
Please ???