collapse

* User Info

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

* Who's Online

  • Dot Guests: 73
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • BCNPalomino: lol, that search doe :O
    July 18, 2014, 09:26:27 AM
  • RohailPro23: hi all
    July 18, 2014, 08:09:00 AM
  • samborabora: sorry, thought this was search, lol
    June 29, 2014, 04:45:12 AM
  • samborabora: sp_embed_image
    June 29, 2014, 04:45:01 AM
  • stanyy: Was it merely correcting the mistake made in 2.0.7 or is 2.0.8 actually faster than 2.0.6?
    June 20, 2014, 07:51:21 AM
  • AngelinaBelle: Smf 2.0.8 has been released. -- uses less memory than 2.0.7 [link]
    June 19, 2014, 03:46:47 PM
  • iSamp: [link]
    June 14, 2014, 06:42:38 AM
  • iSamp: SiNaN Plz Help
    June 14, 2014, 06:42:12 AM
  • iSamp: I need Help Plz Help Me I posted a Thing In English Support Plz read it
    June 14, 2014, 06:21:15 AM
  • Cyberkid: hey!
    June 12, 2014, 02:29:42 AM
  • AngelinaBelle: Hello!
    June 03, 2014, 01:06:04 PM
  • kal: also, hello. :)
    June 03, 2014, 08:36:43 AM
  • kal: I haven't been here in a couple months I don't think.
    June 03, 2014, 08:36:35 AM
  • AngelinaBelle: Welcome back, David
    June 02, 2014, 06:18:46 AM
  • David: I've missed this place!
    June 02, 2014, 01:04:01 AM

* Team Blog

* Recent Posts

Re: theme buged after installing simpleportal by andy
[Yesterday at 10:54:28 PM]


Re: how to remove simpleportal 100% by andy
[Yesterday at 10:49:41 PM]


how to remove simpleportal 100% by crshep
[Yesterday at 07:38:20 AM]


theme buged after installing simpleportal by danget
[Yesterday at 03:05:45 AM]


Re: Members of a membergroup in footer block by Smasher
[July 22, 2014, 04:19:26 PM]

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Author Topic: [Tip] Post Notifications on shoutbox  (Read 10807 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: 362
  • 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: 767
  • Gender: Male
  • On Hiatus
    • WebDev
  • SMF Version: 2.0.7
  • 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 ???