collapse

* User Info

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

* Who's Online

  • Dot Guests: 139
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • Skaty: [link]
    Yesterday at 02:54:27 PM
  • Skaty: tooltip in sp block
    Yesterday at 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
  • DeToX: very nice simple mod's like!
    May 09, 2013, 01:32:03 PM
  • dhayzon: ;D
    May 09, 2013, 12:38:23 PM
  • dhayzon: xd
    May 09, 2013, 12:38:19 PM
  • dhayzon: hola y les hablo en español me gusta mucho el portal
    May 09, 2013, 12:38:12 PM
  • la muerte: If only I'd know how to fix it :D
    May 06, 2013, 11:24:15 AM
  • la muerte: I might have found the reason many sites have issues with shoutbox refresh looping on post etc [link]
    May 06, 2013, 11:23:57 AM
  • apo: elinize saglik beyler
    May 03, 2013, 02:08:40 PM
  • [SiNaN]: Well, you can't do much about it. I'm sure everyone is trying their best but it's not easy. At least old solved topics may provide a clue for those having similar problems I hope.
    May 02, 2013, 11:33:00 AM
  • JohnS: Wow! visited site earlier and 3 users online - that must be a record lately. I ca't see point of support pages here as number of posts with zero replies is big!
    May 02, 2013, 08:46:34 AM
  • rocknroller: what is up
    April 30, 2013, 02:06:06 PM
  • rocknroller: hey
    April 30, 2013, 02:05:53 PM
  • dhayzon: Shoutbox in an iframe is possible
    April 27, 2013, 11:00:14 AM

* Team Blog

* Recent Posts

Re: Only certain topics by dhayzon
[Today at 03:14:29 PM]


Re: Only certain topics by Old Fossil
[Today at 12:50:12 PM]


Re: Only certain topics by DeToX
[Today at 12:47:11 PM]


Re: auto ban/rejection on new members by igirisjin
[Today at 12:15:02 PM]


auto ban/rejection on new members by monbade
[Today at 11:48:02 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 7960 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

  • Translator
  • *
  • Posts: 304
  • 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: 527
  • Gender: Male
  • SMF Arcade Admin
    • askusaquestion.net
  • 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 ???