PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2007-02-03 11:23:50

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Elektra Labels for Topic 1.0.0

Code:

##
##
##        Mod title:  Elektra Labels for Topic
##
##      Mod version:  1.0.0
##   Works on PunBB:  1.2.14
##     Release date:  2007-01-3
##           Author:  artoodetoo <master@1wd.ru>
##
##      Description:  This mod allows authors to mark their topics by comma-separated
##                    list of labels. Anybody can quick search all topics with the same label.
##
##   Affected files:  admin_options.php
##                    viewforum.php
##                    viewtopic.php
##                    post.php
##                    edit.php
##                    search.php
##                    include/functions.php
##                    lang/English/common.php
##
##       Affects DB:  Yes
##                    topics table
##
##            Notes:  1) As always, if you find problems with this mod,
##                       please e-mail them to me so I could get them fixed as soon as possible.
##                    2) After you install this mod, you can turn this ON or OFF
##                       from the Administration/Options Panel!
##                    3) For UTF-8 forums, use 'mb_strtolower' instead of 'strtolower'!
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download here

Offline

 

#2 2007-02-03 11:28:30

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

There is a zip (~250K) with already installed mod under PunBB 1.2.14 + Russian language files.

Screenshots:
- viewtopic shot
- viewforum shot
- search shot


[s]You can this mod in action on my _http://*[/s] - outdated

edited: some extension is here: http://punbb-pe.org.ru/search.php?action=show_label

Last edited by artoodetoo (2008-04-18 07:32:01)

Offline

 

#3 2007-02-03 14:18:32

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

http://www.punres.net/files/projects/pr_343/rid_588/labels-1.gif
Labels mod in action. Image thumnails is another my mod.

Last edited by artoodetoo (2008-04-18 07:34:37)

Offline

 

#4 2007-02-03 16:12:30

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Elektra Labels for Topic 1.0.0

Interesting mod smile
Does this include a search feature?


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#5 2007-02-03 16:36:30

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

Does this include a search feature?

Exactly!

Offline

 

#6 2007-02-03 22:16:44

twohawks
Member
From: Nevada, USA
Registered: 2006-09-21
Posts: 237

Re: Elektra Labels for Topic 1.0.0

Very Interesting mod!


TwoHawks
Love is the Function
No Form is the Tool

Offline

 

#7 2007-02-04 06:23:30

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

I've fix some minor lacks. I prefer do not start new "release".
urlencode and pun_htmlspecialchars in label anchors now.

New file name is labels_mod_100_hotfixed.zip . Please download it instead of labels_mod_100.zip !

Offline

 

#8 2007-02-09 03:58:01

naitkris
Member
From: Cork, Ireland
Registered: 2007-01-27
Posts: 77

Re: Elektra Labels for Topic 1.0.0

very nice mod, something that would make it even better would be to have an "Alert" feature for certain tags so that a person gets an email or IM when a new topic is started with that tag.

Last edited by naitkris (2007-02-09 05:07:53)

Offline

 

#9 2007-02-09 19:36:41

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

naitkris wrote:

an "Alert" feature for certain tags so that a person gets an email or IM when a new topic is started with that tag.

wow! yes, it'll be great! but how to implement?
i have to start search after every post|edit? or i have to add new table {author, tag} and notify all authors with this tag? i.m.h.o., that is very expensive...

another way: accumulate all tags in authors profile. user can track any of his|her tag from  personal page on forum.
livejournal blog have such feature. how do you like it?

Last edited by artoodetoo (2007-02-09 19:38:03)

Offline

 

#10 2007-02-09 20:01:52

naitkris
Member
From: Cork, Ireland
Registered: 2007-01-27
Posts: 77

Re: Elektra Labels for Topic 1.0.0

artoodetoo wrote:

naitkris wrote:

an "Alert" feature for certain tags so that a person gets an email or IM when a new topic is started with that tag.

wow! yes, it'll be great! but how to implement?
i have to start search after every post|edit? or i have to add new table {author, tag} and notify all authors with this tag? i.m.h.o., that is very expensive...

well not really. it should only be done after every new thread - not after every new post. as the label is added by the thread starter it is only his/her first post that needs to do this search and then email/PM to the users who have this tag.

otherwise, your idea of accumulating the posts in the authors profile sounds like a good alternative.

Offline

 

#11 2007-02-11 09:23:35

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

naitkris, Thank you!
I'll think about it. I'll try to apply your idea in next release.

Offline

 

#12 2007-02-11 18:47:39

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

Please, try my another mod with same search technique: Elektra Profile with Labels
http://www.punres.net/viewtopic.php?id=2941
Additional profile fields and quick search by interests.

Offline

 

#13 2007-02-11 19:54:14

naitkris
Member
From: Cork, Ireland
Registered: 2007-01-27
Posts: 77

Re: Elektra Labels for Topic 1.0.0

artoodetoo wrote:

naitkris, Thank you!
I'll think about it. I'll try to apply your idea in next release.

it'd be really cool if it was added artoodetoo (to email people subscribed to a label when it is added to a new topic), if i have time at some stage i may add it myself but i am quite busy the next few months with college.

Offline

 

#14 2007-02-12 16:05:56

naitkris
Member
From: Cork, Ireland
Registered: 2007-01-27
Posts: 77

Re: Elektra Labels for Topic 1.0.0

btw - i forgot to mention that your instructions for installing the mod has 2 x purge_label, explode_labels, and implode_labels in functions and so produces an error.

i noticed that the labels are not part of the regular search for the forum (not available in "Search in" on search.php) - do you plan to change this in a future version so that a choice is given to search only labels like now OR labels and normal search together?

another simple modification would be to have an option of including a label already for the user by them just clicking a link to post a new thread (say on the label search results page after having searched for a label), like http://url.com/forums/post.php?fid=1&am … LABELNAME2 so the user can forget about adding labels in this case as they just follow the link from the search page.

Last edited by naitkris (2007-02-12 16:07:32)

Offline

 

#15 2007-02-13 05:30:35

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

Shame on me! Yes, there are duplicates in readme sad

Labels will not found via traditional search. I dont think that is necessary.

I have upload new labels_mod_100_hotfixed_2.zip
Changes are: no duplicates; *_labels() functions now is the same as in Elektra profile mod.

Last edited by artoodetoo (2007-02-13 09:55:40)

Offline

 

#16 2007-02-13 06:21:27

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

draft for next release:
- acumulate all labels from user topics. show them in user profile.
- accumulate last 5 user searches. save them in session cookies.

post & edit topic from WOULD like:
http://www.punres.net/files/projects/pr_343/rid_588/future-labels-1.gif
this is list of posted and searched labels for substitution

Offline

 

#17 2007-02-19 23:11:17

naitkris
Member
From: Cork, Ireland
Registered: 2007-01-27
Posts: 77

Re: Elektra Labels for Topic 1.0.0

that looks cool artoodetoo.

btw - i have almost finished a change to your Elektra Labels for Topic for my forum so that it sortof automates labelling for the users as my forum will only require certain keywords which i have stored in a seperate DB. put basically - it runs through each new thread post or edit of one and checks for these words and if it finds them it assigns the correct label. it is not yet finished though as i have been busy with other work.

Offline

 

#18 2007-02-20 04:56:46

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

naitkris, it sounds interesting! Would you publicate your extension on complete set?

Offline

 

#19 2007-02-20 14:51:55

naitkris
Member
From: Cork, Ireland
Registered: 2007-01-27
Posts: 77

Re: Elektra Labels for Topic 1.0.0

yeah, once done i may add it here if someone wants it. it's quite specific though but can be useful depending on the website.

Offline

 

#20 2007-04-24 02:18:05

crusader
Member
From: Canada
Registered: 2006-10-26
Posts: 219
Website

Re: Elektra Labels for Topic 1.0.0

I am having a problem with this mod. When I create a new post the label is not present. The only way it works is for me to go in and edit the post and then add the label and then it works. What am I doing wrong. I've looked over the instruction over and over again and it all seems fine. I've pasted area I imagine would be most likely to cause the problem. Maybe someone can see if I did something wrong.

Code:

            // Create the topic
    $db->query('INSERT INTO '.$db->prefix.'topics (poster, subject, posted, last_post, last_poster, forum_id, labels, icon_topic) VALUES(\''.$db->escape($username).'\', \''.$db->escape($subject).'\', '.$now.', '.$now.', \''.$db->escape($username).'\', '.$fid.', \''.$db->escape($labels).'\', '.$icon_topic.')') or error('Unable to create topic', __FILE__, __LINE__, $db->error());

Last edited by crusader (2007-04-24 02:20:22)

Offline

 

#21 2007-04-24 16:01:44

crusader
Member
From: Canada
Registered: 2006-10-26
Posts: 219
Website

Re: Elektra Labels for Topic 1.0.0

so no one can help me out with this problem?

Offline

 

#22 2007-04-24 17:23:48

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

crusader, yor code have "icon_topic" clause. it's some mod i didn't know. could you tell what is it?
please send me all your post.php file to
master (at) punbb-pe.org.ru
i'll try to help you

Last edited by artoodetoo (2008-04-18 07:33:22)

Offline

 

#23 2007-04-24 19:05:17

crusader
Member
From: Canada
Registered: 2006-10-26
Posts: 219
Website

Re: Elektra Labels for Topic 1.0.0

Hi artoodetoo,

I sent you the file via email. Also, that icon_topic is used for the post. You can see it on http://shedrockonline.com when you create a new thread.

Thanks for the help.

Offline

 

#24 2007-04-25 10:18:49

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Labels for Topic 1.0.0

crusader, i sent you my answer.
you missed to modify two "INSERT INTO topics" operators added after Poll mod.
hope, everything is allright now smile

Offline

 

#25 2007-04-25 19:03:35

crusader
Member
From: Canada
Registered: 2006-10-26
Posts: 219
Website

Re: Elektra Labels for Topic 1.0.0

Thanks. I saw what you were referring to. I fixed it. Thank you so much for the help.

Last edited by crusader (2007-04-25 19:15:51)

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.