creating new spy notifications

hello, i have built a music player and i am having a hard time figuring out how to creating new spy notification .

the eg below is the params for an entry that i found in the spy_data table for the polls module and i was wondering what numbers signifies are what they reference to.

a:4:{s:12:"profile_link";s:36:"http://susscentral.com/administrator";s:12:"profile_nick";s:13:"administrator";s:8:"poll_url";

s:57:"http://susscentral.com/m/poll/&action=show_poll_info&id=2";s:12:"poll_caption";s:12:"i love Jesus";}

 

thanks

Quote · 21 Jul 2011

any body out there can help me please

I know that the spys are stored in the "bx_spy_data, but i dont understand the params                          eg.                                                                                                                                                a:4:{s:12:"profile_link";s:36:"http://susscentral.com/administrator";s:12:"profile_nick";s:13:

"administrator";s:9:"entry_url";s:53:"http://susscentral.com/m/gossip/view/some-nice-gossip";s:11:"entry_title";s:16:"some nice gossip";}      

what does the numbers signifies (a:4, s:36, s:12, s13, s:9, and s:53). when just add the new lagueage key to the tabel i get this messgae on the spy page:{profile_nick} shared a playlist {entry_title}, what am i missing here.

 

Please any help would be good.

 

Quote · 21 Jul 2011

I am not sure how to create a new spy notification, but i believe that table just stores the info to be displayed. It does not create it. I believe the spy module ties into the dolphin event system But not positive.

Any how. The data you are seeing is a string representation of an array. You should not try to decode manually.

For example this string.

a:4:{s:12:"profile_link";s:36:"http://susscentral.com/administrator";s:12:"profile_nick";s:13:"administrator";s:8:"poll_url";s:57:"http://susscentral.com/m/poll/&action=show_poll_info&id=2";s:12:"poll_caption";s:12:"i love Jesus";}

When unserialize using the php function unserialize shows an array.

array (
  'profile_link' => 'http://susscentral.com/administrator',
  'profile_nick' => 'administrator',
  'poll_url' => 'http://susscentral.com/m/poll/&action=show_poll_info&id=2',
  'poll_caption' => 'i love Jesus',
)

This method using the php functions serialize() and unserialize() are used quite often in php to convert arrays to strings to store them in a database and then back to an array again later.

https://www.deanbassett.com
Quote · 21 Jul 2011

thanks for your reply, i know about the functions serialize() and unserialize(), because i met them when integrating third party modules notification on IBDW spywall. 

i think even thou the values that are suppose to be display is stored in the prams table, if i copy the prams below and change the value of entry title (some nice gossip) to  "some nice", it will not display on the wall or spy page. its seems like there's is some kind of validation before displaying the info on the pages.

{s:12:"profile_link";s:36:"http://susscentral.com/administrator";s:12:"profile_nick";s:13:

"administrator";s:9:"entry_url";s:53:"http://susscentral.com/m/gossip/view/some-nice-gossip";s:11:"entry_title";s:16:"some nice gossip";}      

Quote · 21 Jul 2011

Dolphin unserializes it, so if it is not proper, it will fail. Changing the sting text without changing the number will damage the string causing unserialize to fail.

Most of the numbers are the length of the string. For example.

a:4:{s:12:"profile_link";s:36:"http://susscentral.com/administrator";

The s:12 means thet the string that follows is 12 characters long. Which profile_link is.

The a:4 is means array with 4 values.

https://www.deanbassett.com
Quote · 21 Jul 2011

i check it thats the problem. thank you so much deano92964, that was what i did not know. the notifications are coming up now. 

thank you, thank you

Quote · 21 Jul 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.