collapse

* User Info

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

* Who's Online

  • Dot Guests: 44
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • Mstcool: :p *
    September 13, 2014, 07:55:49 PM
  • Mstcool: so when is a new version coming out? :o
    September 13, 2014, 07:55:45 PM
  • USFA: sorry thought was search no glasses
    September 06, 2014, 08:48:23 PM
  • USFA: rename forum
    September 06, 2014, 08:47:40 PM
  • Mstcool: Oh, ok, Sinan
    August 25, 2014, 10:19:15 PM
  • ArsenArsen: When i make them
    August 19, 2014, 12:20:20 AM
  • ArsenArsen: I had some mod ideas, i will put them.
    August 19, 2014, 12:19:45 AM
  • [SiNaN]: We could, but it's there as a reminder of some kind, that we should fill it in, somehow.
    August 18, 2014, 09:57:14 PM
  • Mstcool: Y don't u guys remove the customization section since it has no files?
    August 17, 2014, 10:27:28 PM
  • ArsenArsen: Ok, Great!
    August 15, 2014, 03:13:18 PM
  • [SiNaN]: We have the translators' names listed in the downloads area.
    August 15, 2014, 03:05:39 PM
  • ArsenArsen: Never Mind, i wont, noone did.
    August 15, 2014, 02:22:32 PM
  • ArsenArsen: Can i put mz name on translation
    August 15, 2014, 02:21:06 PM
  • [SiNaN]: You can only change your forum profile options once you have 5 posts. I have made an exception for Translator group though, so you should be able to do it now.
    August 13, 2014, 03:32:17 PM
  • ArsenArsen: Cant find where to change avatar
    August 13, 2014, 03:12:38 PM
  • ArsenArsen: Ok
    August 11, 2014, 05:17:55 AM
  • Underdog: there is a documentation link on your top-right
    August 10, 2014, 08:48:45 PM
  • ArsenArsen: What to use for docs? This is NoT SP support question.
    August 10, 2014, 02:55:55 PM
  • Ron-KK4HGY: Hello all!
    August 06, 2014, 03:22:50 PM
  • USFA: tada
    August 04, 2014, 09:49:45 PM

* Team Blog

* Recent Posts

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 11203 times)

0 Members and 1 Guest are viewing this topic.

Offline 130860

  • Super Handsome Language Coordinator
  • Comrade
  • *
  • Posts: 1777
  • 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, 03: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, 03:36:52 PM »
No errors but just dont show up  ;)

Offline 130860

  • Super Handsome Language Coordinator
  • Comrade
  • *
  • Posts: 1777
  • 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, 03: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, 03:47:41 PM »
No result grrrrrrrrrrrrrrrrrr

Offline phantomm

  • Support
  • *
  • Posts: 383
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: [Tip] Post Notifications on shoutbox
« Reply #44 on: November 30, 2012, 09: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 Underdog

  • Support
  • *
  • Posts: 807
  • Gender: Male
  • On Hiatus
    • WebDev
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: [Tip] Post Notifications on shoutbox
« Reply #45 on: November 30, 2012, 02: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, 03:20:26 PM by Underdog »

weerforum

  • Guest
Re: [Tip] Post Notifications on shoutbox
« Reply #46 on: February 05, 2013, 05: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, 02:02:10 PM »
Please ???