Author |
Message |
nuken
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/3234de284ee21bd39eecd.jpg)
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Wed Feb 29, 2012 4:51 pm |
|
I have been working on a Twitter type hashtag mod for the forums and was wondering if this is something users would be interested in? If you are not familiar with hashtags, they are any word that you place the # sign in front of to link to other posts with the same hashtag. It is basically a lazy mans tag system. The mod I am working on finds these hashtags and links them to a keyword search in the forum. Give me some feedback so I will know if this is worth the time to test and finish it. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Thu Mar 01, 2012 11:01 am |
|
Sounds kinda cool, how exactly would it work, just use them within your post? If you use hashes within posts are they "clickable"? I've wanted something like that for this site, so support could tag threads.#browsercache #mysqli #upgrade might be some handy ones recently. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Mar 01, 2012 11:47 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Mar 01, 2012 12:24 pm |
|
Cool. Only suggestion i might have is a minimum string length for tags so you don't end up with tags like #1, #2, etc. I would think a hash should be at least 3 characters. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Mar 01, 2012 12:33 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
eldorado
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/52f4453749f5c4a233463.gif)
Joined: Sep 10, 2008
Posts: 424
Location: France,Translator
|
Posted:
Thu Mar 01, 2012 4:22 pm |
|
Very good thing and outstanding mod... Might I suggest you add this mod on raven's forums?
This is perfect to speed up #search in #ravenphpscripts #forums
Would be very good if you add something like @@user and redirects to the user's posted posts ![Very Happy](modules/Forums/images/smiles/icon_biggrin.gif) |
_________________ Only registered users can see links on this board! Get registered or login! (My RN site)- Only registered users can see links on this board! Get registered or login!(cod4 clan) - Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Thu Mar 01, 2012 4:48 pm |
|
I like this idea A LOT! So much so, I'd like to volunteer to alpha test, possibly assist in development if you need a hand.
It sounds like it might work in a similar fashion to mediawiki tags where you use a {{keyword}} to link to related content?
I would agree with Spastic regarding a minimum length. I presume there would also be some mechanism to prevent duplicate hashtags being created and that 'links' would only be internal. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Mar 02, 2012 8:01 am |
|
Cool. I will work on the minimum length and do some more testing. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Mar 02, 2012 12:16 pm |
|
Anyone that wants to test it, here are the directions.
Open modules/Forums/viewtopic.php and find:
Code: $message = $postrow[$i]['post_text'];
|
After add:
Code: $message = preg_replace('/(^|\s)#([a-z0-9_-]{3,}+)/i', '$1<a href="modules.php?name=F orums&file=search&search_keywords=$2&mode=results">#$2</a>', $message);
|
You will need to remove the space between the F and the o in Forums. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Mar 02, 2012 1:41 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Mar 02, 2012 3:09 pm |
|
This is the code to use the @someone author search
Code:
$message = preg_replace('/(^|\s)@([a-z0-9_-]{3,}+)/i', '$1<a href="modules.php?name=F orums&file=search&search_author=$2&mode=results">@$2</a>', $message);
|
Again, you will have to remove the space between the F and the o in Forum.
This mod may be better used on the posting side of it so a jquery dropdown list of actual users could be used. That is for another day though. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Mar 02, 2012 3:31 pm |
|
They say the simplest idea's are the best. I was thinking of all sorts of technical things when you first mentioned this but it works a treat. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Mar 02, 2012 3:43 pm |
|
I like it because it's simple, easy and on the output side of the database so there is not a security risk... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
eldorado
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Mar 03, 2012 6:26 am |
|
cool , @author will be very very good for my forums to refer to someone else's post ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Mar 03, 2012 9:17 am |
|
eldorado wrote: | cool , @author will be very very good for my forums to refer to someone else's post |
In that case you might want to use @author-username otherwise you'll have a link that isn't a unique search term |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Mar 03, 2012 10:33 am |
|
The code I posted above for the @username should work with just the @username because it is doing an author search instead of a keyword search like the hash tag one is. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Mar 04, 2012 3:14 am |
|
Doh! - sorry I hadn't spotted that ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
eldorado
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Mar 04, 2012 12:05 pm |
|
I imagine that #{multiple queries strings} isn't supported and only #{multiple will be parsed? Defeats the purpose of tags btw , but just an interresting feature to be implement differently , (through bbcodes perhaps)
Now that we are doing this , is this possible to make it work for articles ,an addition for "Tricked Out News" for example using site wide search (throwing my 2.cents into an already overworked mind ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|