collapse

* User Info

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

* Who's Online

  • Dot Guests: 34
  • Dot Hidden: 0
  • Dot Users: 2
  • Dot Users Online:

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • Bullet: Shoutbox is not for support!
    June 14, 2013, 05:25:48 PM
  • ivanotero: como pongo un chat en mi foro
    June 10, 2013, 06:22:15 PM
  • Bohimina: Can someone help me in my thread? TY
    June 04, 2013, 05:06:25 PM
  • dhayzon: ;P
    June 04, 2013, 12:27:55 PM
  • dhayzon: Hello all
    June 04, 2013, 12:27:47 PM
  • ComeAtMeBrosef: hi
    June 04, 2013, 12:13:23 AM
  • dhayzon: hi
    June 03, 2013, 05:30:18 PM
  • mag07: Hello all, registration captcha on the forums is a nightmare, took me 4 tries, listen option doesn't work either :S
    June 03, 2013, 02:32:42 AM
  • Divecall: whats happend?
    May 31, 2013, 02:26:35 AM
  • Randomking: if any one is there can you reply so i know ur listening
    May 30, 2013, 09:52:00 AM
  • Randomking: hey guys i have a quick question?
    May 30, 2013, 09:51:38 AM
  • BurkeKnight: Hi all. I'm back. :)
    May 27, 2013, 05:38:45 AM
  • Skaty: [link]
    May 21, 2013, 02:54:27 PM
  • Skaty: tooltip in sp block
    May 21, 2013, 02:54:20 PM
  • Tattoocu_CarteL: neden adres yazınca link diye çikiyor direk adres çiksa olmaz mı
    May 19, 2013, 11:54:41 AM
  • Tattoocu_CarteL: [link]
    May 19, 2013, 11:54:26 AM
  • Old Fossil: Hey Nathaniel
    May 16, 2013, 09:41:05 AM
  • Nathaniel: lurk
    May 16, 2013, 03:19:14 AM
  • omidmavi1986: :'(
    May 15, 2013, 05:51:48 AM

* Team Blog

* Recent Posts

Join us on IRC! Come on in to #simpleportal on the irc.villageirc.net server.

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

0 Members and 2 Guests 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

  • Translator
  • *
  • Posts: 307
  • Gender: Male
  • Smile, tomorrow will be worse...
  • 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: 562
  • Gender: Male
  • SMF Arcade Admin
    • Underdog-01 GitHub Repositories
  • SMF Version: 2.0.2
  • 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 ???