PtokaX forum

Archive => Archived 5.1 boards => Request for scripts => Topic started by: chao on 14 October, 2006, 22:43:43

Title: Slam Script
Post by: chao on 14 October, 2006, 22:43:43
Hi,
I am new to this, so i would try my best to explain my request.

I am in search of a script wich is similar to a slam book. In this users are allowed to edit their own slam book's wich contains name, hobbies, favourite passtime etc

Any other user is allowed to view others slam book, and can add messages to it, and when tht particular user comes online he will get the messages added to his scrap book and can read it.

This was my request, any more ideas are welcomed
If u all r not clear with my post, please tell me.
Posted on: 13 October 2006, 21:29:01
the commands would be like
!slambook <nick>   to view others slam book
!myslambook  to view own slam book
!editsb <section eg:hobbies> <new entry>  to edit own slam book
!addsbmess <nick>    to send message to tht user
!sbhelp  Help menu

The slam book would some what like this:
Quote
Name: John Sunny

Address: 22 Hide park, Ratnagiri

Hobbies: Playing cricket, football



Your messages:
<nick>: Yo dude I didn kno tht ur name was john.....

Posted on: 13 October 2006, 22:58:01
I got this idea from http://www.orkut.com

But i guess it is difficult to make such kind of script in Lua  :(
Title: Re: Slam Script
Post by: bastya_elvtars on 15 October, 2006, 00:56:44
I think a Wiki or something like it would be better. Controlling such a ting through commands makes me ill.
Title: Re: Slam Script
Post by: chao on 29 October, 2006, 08:08:45
Quote from: bastya_elvtars on 15 October, 2006, 00:56:44
I think a Wiki or something like it would be better. Controlling such a ting through commands makes me ill.

wa do u mean by tht, plzz help me out
Title: Re: Slam Script
Post by: Rincewind on 29 October, 2006, 08:49:14
This sounds a little like the Bookshelf script I did. Take a look at it and let me know if the basic functionality is what you mean and I will have a go at creating a version for the Slambook.
Title: Re: Slam Script
Post by: chao on 29 October, 2006, 09:21:13
Quote from: Rincewind on 29 October, 2006, 08:49:14
This sounds a little like the Bookshelf script I did. Take a look at it and let me know if the basic functionality is what you mean and I will have a go at creating a version for the Slambook.

yup, had a look at ur bookshelf script, it is quiet similar with wat i want. Instead of genre, author, title ,series, position i would like name , place, hobbies etc wich can be edited anytime.
Title: Re: Slam Script
Post by: Rincewind on 29 October, 2006, 19:38:17
I can do a copy of Bookshelf and amend it wqhere necessary to work as your Slambook request.

I will set it so the basic details of a user can only be set by the user or an Operator. Messages will be able to be added by anyone with them only being editable by the user who submitted them or Operators.

When a user logs in they will be informed of new messages or if they are online get a PM saying a new message has been submitted/changed.

The fields you want are;
      Nick
      Real Name
      Place
      Interests

Any other fields needed?
Title: Re: Slam Script
Post by: chao on 29 October, 2006, 20:04:10
yup....but it I would like such tht these fields can be anytime added, changed or removed..
Title: Re: Slam Script
Post by: Rincewind on 29 October, 2006, 20:14:11
Well nick will be a required field  ;) but the rest can be made available for changes any time.

I'll take a look at doing this for you but it may take me a few days as I am also in thye middle of finishing off a major script for beta testing. But I will get it done as soon as I can
Title: Re: Slam Script
Post by: chao on 29 October, 2006, 20:42:17
The nick shud not be editable by the user
As the some users r very naughty who will change the nick of their profile to something very bad, quiet possible
Title: Re: Slam Script
Post by: Rincewind on 29 October, 2006, 20:46:32
Not a problem.
Title: Re: Slam Script
Post by: st0ne-db on 29 October, 2006, 20:59:15
Quote from: chao on 14 October, 2006, 22:43:43
I am in search of a script wich is similar to a slam book. In this users are allowed to edit their own slam book's wich contains name, hobbies, favourite passtime etc

Any other user is allowed to view others slam book, and can add messages to it, and when tht particular user comes online he will get the messages added to his scrap book and can read it.

sounds similar to a script i made a while ago... User.Profile.Bot.v1.0
This bot allows your users to add additional contact information to a database viewable by other users.

Contact Info:

    * Homepage
    * Users Hub
    * ICQ Number
    * AOL Messenger Screen Name
    * Yahoo! Messenger Acount Name
    * MSN Messenger
    * Birthday
    * Gender
    * Location
    * Interests
    * Occupation
    * Custom Shout

Admin command for moderating users entrys.
Custom User/Admin Access control.

check it out... maybe is similar to what you need. Download (http://the-westside.no-ip.info/request.php?User.Profile.Bot.v1.0.LUA5-PtokaX.rar)
Title: Re: Slam Script
Post by: chao on 29 October, 2006, 22:24:11
yup it is similar to wat i want except for a few changes tht the profile shud come in PM, it shud contain a place for messages posted by other on the profile (as per my request posted above)

and the fields shud be editable but not the nick
Title: Re: Slam Script
Post by: st0ne-db on 30 October, 2006, 07:27:37
Quote from: chao on 29 October, 2006, 22:24:11
yup it is similar to wat i want except for a few changes tht the profile shud come in PM, it shud contain a place for messages posted by other on the profile (as per my request posted above)

and the fields shud be editable but not the nick

Try this, let me know how it works out.
User.Profile.Bot.v1.1.LUA5.X-PtokaX (http://the-westside.no-ip.info/request.php?4)
Title: Re: Slam Script
Post by: chao on 30 October, 2006, 08:17:29
Yup, had a look at the script.
1 bug tht when I try to use the command !comment the following error comes
Quote
[12:34] Syntax ....5.1\scripts\User.Profile.Bot.v1.1.LUA5.X-PtokaX.lua:271: attempt to concatenate global 'tVar' (a table value)

And the fields dont come in proper order i.e if I want hobbies or yahoo to come first on the top thn wat shud I do ??

And could you change the layout of the profile like:
Quote
[]************ chao ************[]*

Hobbies:

Yahoo:

Aim:

Occupation:

[]*****************************[]*

Your Messages:(0/0)  <------ this means, first "0" for read messages and second "0" for total messages

[]*****************************[]*



Title: Re: Slam Script
Post by: st0ne-db on 30 October, 2006, 08:44:59
Quote from: chao on 30 October, 2006, 08:17:29
Yup, had a look at the script.
1 bug tht when I try to use the command !comment the following error comes
sorry about that, just download the script again.

Quote from: chao on 30 October, 2006, 08:17:29
And the fields dont come in proper order i.e if I want hobbies or yahoo to come first on the top thn wat shud I do ??
It all has to do with how the table is serialized when saved. Is there a certain reason why they need to be in a specific order?

Quote from: chao on 30 October, 2006, 08:17:29
And could you change the layout of the profile:

Your Messages:(0/0)  <------ this means, first "0" for read messages and second "0" for total messages
Im not sure why there is a need to tell you how many read/total comments you have, once you have comments on a profile they will automatically show up under the Comments section, the numbers will be the same. You are informed on connection if there are new comments on your profile. If you still feel like it needs to be changed, I can see what I can do.


Title: Re: Slam Script
Post by: chao on 30 October, 2006, 08:58:54
Quote from: st0ne-db on 30 October, 2006, 08:44:59
It all has to do with how the table is serialized when saved. Is there a certain reason why they need to be in a specific order?
It would be like a slam book in wich everything is systematic, tht's y

Quote from: st0ne-db on 30 October, 2006, 08:44:59
Im not sure why there is a need to tell you how many read/total comments you have, once you have comments on a profile they will automatically show up under the Comments section, the numbers will be the same. You are informed on connection if there are new comments on your profile. If you still feel like it needs to be changed, I can see what I can do.

Ok no prob abt the messages but the layout, i dont like those dots in every field.
And there shud be a space between every field
like
yahoo:

AIM:
Title: Re: Slam Script
Post by: st0ne-db on 30 October, 2006, 09:16:26
Quote from: chao on 30 October, 2006, 08:58:54
Ok no prob abt the messages but the layout, i dont like those dots in every field.
And there shud be a space between every field
like
yahoo:

AIM:

Feel free to edit the script to your liking, the code you want starts on line 440 and ends on line 480.
For instance if you dont like the dots then remove them, or change it to something that suits you better.

sMsg = sMsg.."\t    ? "..k.." "..string.rep(". ",9).."\t- "..v.."\n";

to

sMsg = sMsg.."\t      "..k.." "..string.rep(". ",9).."\t- "..v.."\n";


If you would like to add an additional new line between fields.
For instance, use an additional \n at the end (\n = newline, \t = tab space)

sMsg = sMsg.."\t     "..k.." "..string.rep(". ",9).."\t- "..v.."\n";

to

sMsg = sMsg.."\t     "..k.." "..string.rep(". ",9).."\t- "..v.."\n\n";
Title: Re: Slam Script
Post by: chao on 30 October, 2006, 10:07:13
The script now works as requested
Thank you Stone-db, Rincewind and Bastya_elvtars to help me out with my first post.

hey stone-db,
I still didnt understand how to add the fields in proper order as I want, could you plzz help me out....Is it possible??

Thank you
Title: Re: Slam Script
Post by: dodgeviper on 16 November, 2006, 11:59:44
i have done the followin changes to my script ... the script is attached below...


1.The courting Quote thing doesn't work
2. when ever a new profile is added all the other profiles are upgraded with the contents of the new profile/....
3. Comments also get deleted automatically after some time

Can anyone please help me correcting this one....
Title: Re: Slam Script
Post by: dodgeviper on 17 November, 2006, 08:20:37
Nobody is ready to help me out.... :-[