Hashtags on forum
+5
Jack Atlas
Ange Tuteur
Van-Helsing
Pizza Boi
TheCrow
9 posters
Page 2 of 3
Page 2 of 3 • 1, 2, 3
Hashtags on forum
First topic message reminder :
Hello. Does anyone know how to add hashtags on my forum? I always wanted to add hashtags on my forum
Forum Version: PunBB
Thanks!
Hello. Does anyone know how to add hashtags on my forum? I always wanted to add hashtags on my forum
Forum Version: PunBB
Thanks!
Re: Hashtags on forum
Pizza Boi wrote:Hi
@OP: Install LGBB and just use the hashtag code.
Regards,
Pizza Boi
Hello my friend. I was expecting your answer.
Now, everyone tells me to do that. Which of all those codes i must use to get those hashtags. I asked everyone but noone tells me.
Can you please tell me the codes that i must use. I really want those hashtags but not make all others like sh**. ^^
Re: Hashtags on forum
Hi
I'm still experimenting with the hash tag thing so you can read through this one: http://www.avacweb.com/t1026p105-hashtag-system or in page 7 and 8.
And this one as a basis from LGBB:
http://www.avacweb.com/t428-13-create-new-bbcodes-with-new-lgbb - For LGBB installation
And this one:
To be inputted after the core of the Javascript (LGBB Core). I'm trying to make my own Hashtag at the moment, but still no luck as I am still not that great with JS.
Regards,
Pizza Boi
I'm still experimenting with the hash tag thing so you can read through this one: http://www.avacweb.com/t1026p105-hashtag-system or in page 7 and 8.
And this one as a basis from LGBB:
http://www.avacweb.com/t428-13-create-new-bbcodes-with-new-lgbb - For LGBB installation
And this one:
- Code:
LGBB.addSwap(/(?:^|[\s\n\r])#(\w+)/g, "<a href='/search?search_keywords=$1' target='_blank' class='hashtag'>#$1</a>");
To be inputted after the core of the Javascript (LGBB Core). I'm trying to make my own Hashtag at the moment, but still no luck as I am still not that great with JS.
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
Well i have read all threads that have been made but my problem is which code i must use and where?
Talking about this thread here.
http://www.avacweb.com/t428-13-create-new-bbcodes-with-new-lgbb
Talking about this thread here.
http://www.avacweb.com/t428-13-create-new-bbcodes-with-new-lgbb
Re: Hashtags on forum
Hi
You have to use everything except the customized BBC codes LG put in there .
Regards,
Pizza Boi
You have to use everything except the customized BBC codes LG put in there .
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
oh my.. May i ask which one of all those 500 codes given on that post i must not use? I don't know which ones i must use and how? Put them all in one javascript? Which one i must not put? Gee...
Re: Hashtags on forum
Hi
Core:
Parser:
BBC Custom Codes (Not compulsory):
^ Placed below the Core.
Hashtag Custom Code:
^ Placed beneath the Core.
Regards,
Pizza Boi
Core:
- Code:
(function(){"LGBB, a Javascript BBCode parser and API. Copyright \u00a9 by AvacWeb 2011-2013. All Rights Reserved. Use of this script is not allowed without this entire copyright notice in place. No Distribution without authors consent.";var h={expando:"{LGBB:"+(new Date).getMilliseconds()+"}",bbcodes:{},basics:[],attrReg:/([\w-]+)=("|'|)(.*?)\2(?=[\s\]])/g,parseTag:function(a,b,c){for(var d=b.insensitive?"i":"",e="\\["+b.tag+"[^\\]]*?\\]",k="\\[\\/"+b.tag+"\\]",d=c?RegExp("("+e+")(?!.*"+e+")((?:.|[\\r\\n])*?)"+
k,d):RegExp(e,d),l=[];d.test(a);)a=a.replace(d,function(a,d,e){c||(d=a);var f={},g;for(g in b.defaultAttr)f[g]=b.defaultAttr[g];d=h.attrReg.test(d)?d.match(h.attrReg):[];if(d.length)for(var k=0;g=d[k++];)(a=/([\w-]+)=['"]?(.*?)['"]?$/.exec(g))&&a.length&&(a[1]===b.tag&&(a[1]="default"),f[a[1]]=a[2]);if(b.validate&&(c?!b.validate.call(b,e,f):!b.validate.call(b,f)))return l.push(a),h.expando;a=b.replacement;b.replace&&(g=c?b.replace.call(b,e,f):b.replace(f),"string"===typeof g?a=g:g&&"object"===typeof g&&
(e=g.content||e,f=g.attr||f,"string"===typeof f&&(f={"default":f})));return h.swapReplacers(a,e,f)});for(d=0;e=l[d++];)a=a.replace(h.expando,e);return a},swapReplacers:function(a,b,c){if(!a)return"";b||(b="");c||(c={});a=a.replace(/{CONTENT}/g,b);for(var d in c)a=a.replace(RegExp("{ATTR-"+d.toUpperCase()+"}","g"),c[d]);c["default"]&&(a=a.replace(/{ATTR}/g,c["default"]));return a.replace(/{ATTR(-[A-Z-]+)?}/g,"")},parse:function(a){var b=h.bbcodes,c=h.basics;h.expando="{LGBB:"+(new Date).getMilliseconds()+
"}";for(var d=0,e;e=c[d++];){var k=e[0];if("string"===typeof k&&-1===e[1].indexOf(k))for(;-1!==a.indexOf(k);)a=a.replace(k,e[1]);else a=a.replace(k,e[1])}for(var l in b)if(b.hasOwnProperty(l)&&(c=b[l])&&c.replacement&&c.tag)try{a=h.parseTag(a,c,c.close)}catch(m){console.log("LGBB: Error parsing "+c.tag+" tag.",m)}return a},add:function(a,b){if(!/^\w+$/.test(a))throw new Exception("Invalid LGBB tag name: "+a);b.tag||(b.tag=a);b.defaultAttr?"string"===typeof b.defaultAttr&&(b.defaultAttr={"default":b.defaultAttr}):
b.defaultAttr={};"close"in b||(b.close=!1);h.bbcodes[a]=b;return this},addSwap:function(a,b){h.basics.push([a,b]);return this}};window.LGBB=h})();
Parser:
- Code:
$(function(){
var p = $('.post .content');
for(var i = 0, post; (post = p[ i++ ]); ) {
var codes = post.getElementsByTagName('code'), store = [];
for(var j = 0, c; (c = codes[j++]); ) {
store.push(c.innerHTML);
c.innerHTML = '';
}
post.innerHTML = LGBB.parse( post.innerHTML );
for(var s, j = 0; (s = store[j]); ) codes[j++].innerHTML = s;
}
});
BBC Custom Codes (Not compulsory):
- Code:
LGBB.add('div', {
close : true,
replacement : '<div class="{ATTR}">{CONTENT}</div>'
});
LGBB.add('span', {
close : true,
replacement : '<span class="{ATTR}">{CONTENT}</span>'
});
LGBB.addSwap(/Code:(.*?)\<code\>(?:\<br\>)?\[codetitle=["']?([^\]]+?)["']?]/gi, '$2:$1<code>');
for(var LG = 1; LG<7; LG++) {
LGBB.add('h' + LG, {
close : true,
insensitive : true,
replacement : '<h' + LG + '>{CONTENT}</h' + LG + '>'
});
}
^ Placed below the Core.
Hashtag Custom Code:
- Code:
LGBB.addSwap(/(?:^|[\s\n\r])#(\w+)/g, "<a href='/search?search_keywords=$1' target='_blank' class='hashtag'>#$1</a>");
^ Placed beneath the Core.
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
Hi
Hmm... try posting it in the Hashtag topic of theirs and ask for LGBB, I really cannot provide a fast answer at this point, mate. And, the hashtag for FM was invented in their domain so it's best if you ask them instead of here and until one of the members posts an answer for this, I'll continue to look into it.
Regards,
Pizza Boi
Hmm... try posting it in the Hashtag topic of theirs and ask for LGBB, I really cannot provide a fast answer at this point, mate. And, the hashtag for FM was invented in their domain so it's best if you ask them instead of here and until one of the members posts an answer for this, I'll continue to look into it.
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
I don't have an account there and it says that my email is token by someone else. I tried getting the code to my email but nothing seems to come so i cannot post there!
Re: Hashtags on forum
Hi
Try an alternate email then. It's not really a problem to register ...
Regards,
Pizza Boi
Try an alternate email then. It's not really a problem to register ...
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
Assuming that your profile is correct and your board version is PunBB ... and that your other Javascripts aren't hitting errors... this should work for you:
Put this in a JS for all pages:
You now have LGBB installed ... which means you can add numerous custom BBcodes to your forum with almost endless possibilities... There are plenty already written in the LGBB thread.
As well as that you also have a Hashtag system installed into LGBB.
Hope that solves it for you.
Put this in a JS for all pages:
- Code:
(function(){"LGBB, a Javascript BBCode parser and API. Copyright \u00a9 by AvacWeb 2011-2013. All Rights Reserved. Use of this script is not allowed without this entire copyright notice in place. No Distribution without authors consent.";var h={expando:"{LGBB:"+(new Date).getMilliseconds()+"}",bbcodes:{},basics:[],attrReg:/([\w-]+)=("|'|)(.*?)\2(?=[\s\]])/g,parseTag:function(a,b,c){for(var d=b.insensitive?"i":"",e="\\["+b.tag+"[^\\]]*?\\]",k="\\[\\/"+b.tag+"\\]",d=c?RegExp("("+e+")(?!.*"+e+")((?:.|[\\r\\n])*?)"+
k,d):RegExp(e,d),l=[];d.test(a);)a=a.replace(d,function(a,d,e){c||(d=a);var f={},g;for(g in b.defaultAttr)f[g]=b.defaultAttr[g];d=h.attrReg.test(d)?d.match(h.attrReg):[];if(d.length)for(var k=0;g=d[k++];)(a=/([\w-]+)=['"]?(.*?)['"]?$/.exec(g))&&a.length&&(a[1]===b.tag&&(a[1]="default"),f[a[1]]=a[2]);if(b.validate&&(c?!b.validate.call(b,e,f):!b.validate.call(b,f)))return l.push(a),h.expando;a=b.replacement;b.replace&&(g=c?b.replace.call(b,e,f):b.replace(f),"string"===typeof g?a=g:g&&"object"===typeof g&&
(e=g.content||e,f=g.attr||f,"string"===typeof f&&(f={"default":f})));return h.swapReplacers(a,e,f)});for(d=0;e=l[d++];)a=a.replace(h.expando,e);return a},swapReplacers:function(a,b,c){if(!a)return"";b||(b="");c||(c={});a=a.replace(/{CONTENT}/g,b);for(var d in c)a=a.replace(RegExp("{ATTR-"+d.toUpperCase()+"}","g"),c[d]);c["default"]&&(a=a.replace(/{ATTR}/g,c["default"]));return a.replace(/{ATTR(-[A-Z-]+)?}/g,"")},parse:function(a){var b=h.bbcodes,c=h.basics;h.expando="{LGBB:"+(new Date).getMilliseconds()+
"}";for(var d=0,e;e=c[d++];){var k=e[0];if("string"===typeof k&&-1===e[1].indexOf(k))for(;-1!==a.indexOf(k);)a=a.replace(k,e[1]);else a=a.replace(k,e[1])}for(var l in b)if(b.hasOwnProperty(l)&&(c=b[l])&&c.replacement&&c.tag)try{a=h.parseTag(a,c,c.close)}catch(m){console.log("LGBB: Error parsing "+c.tag+" tag.",m)}return a},add:function(a,b){if(!/^\w+$/.test(a))throw new Exception("Invalid LGBB tag name: "+a);b.tag||(b.tag=a);b.defaultAttr?"string"===typeof b.defaultAttr&&(b.defaultAttr={"default":b.defaultAttr}):
b.defaultAttr={};"close"in b||(b.close=!1);h.bbcodes[a]=b;return this},addSwap:function(a,b){h.basics.push([a,b]);return this}};window.LGBB=h})();
$(function(){
var p = $('.post .entry-content');
for(var i = 0, post; (post = p[ i++ ]); ) {
var codes = post.getElementsByTagName('code'), store = [];
for(var j = 0, c; (c = codes[j++]); ) {
store.push(c.innerHTML);
c.innerHTML = '';
}
post.innerHTML = LGBB.parse( post.innerHTML );
for(var s, j = 0; (s = store[j]); ) codes[j++].innerHTML = s;
}
});
LGBB.addSwap(/(?:^|[\s\n\r])#(\w+)/g, "<a href='/search?search_keywords=$1' target='_blank' class='hashtag'>#$1</a>");
You now have LGBB installed ... which means you can add numerous custom BBcodes to your forum with almost endless possibilities... There are plenty already written in the LGBB thread.
As well as that you also have a Hashtag system installed into LGBB.
Hope that solves it for you.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Hashtags on forum
Hi
@LG: It does not work, I have tried it in my test forum: http://tfpbl.forumtl.com/t4-this-is-a-test#15
No other Javascript and have implemented them in all pages.
Regards,
Pizza Boi
@LG: It does not work, I have tried it in my test forum: http://tfpbl.forumtl.com/t4-this-is-a-test#15
No other Javascript and have implemented them in all pages.
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
It doesn't work if the Hashtag is literally the first part of the post.
I can edit the code above so it will allow that.
Change this line:
To this:
That should work fine.
On another note:
I noticed you had an @ tagging system installed.
LGBB can do that for you too in just 1 line:
I can edit the code above so it will allow that.
Change this line:
- Code:
LGBB.addSwap(/(?:^|[\s\n\r])#(\w+)/g, "<a href='/search?search_keywords=$1' target='_blank' class='hashtag'>#$1</a>");
To this:
- Code:
LGBB.addSwap(/(^|[\s\n\r\>])#(\w+)/g, "$1<a href='/search?search_keywords=$2' target='_blank' class='hashtag'>#$2</a>");
That should work fine.
On another note:
I noticed you had an @ tagging system installed.
LGBB can do that for you too in just 1 line:
- Code:
LGBB.addSwap(/(\W)@([^\s<\n]+)/g, '$1@<a href="/profile?mode=viewprofile&u=$2">$2</a>');
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Hashtags on forum
Just one question as this is solved.
Does this code notify users via pm that they were tagged or no?
Thank you!
Does this code notify users via pm that they were tagged or no?
Thank you!
Re: Hashtags on forum
Hi
Okay, it worked! Thanks LG. I'll see the LGBB thing for the @ .
And thanks OP for letting me use this thread, lol.
Regards,
Pizza Boi
Okay, it worked! Thanks LG. I'll see the LGBB thing for the @ .
And thanks OP for letting me use this thread, lol.
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
No it doesn't notify them by PM, there's a lot more involved to do that.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Hashtags on forum
This is not a hashtag system, But you're just looking for any word in the subject title under two modes (Topics/Posts), not in the message content.
For example:
Lets test my name with this search system.. Ahmed
In the Posts mode: https://help.forumotion.com/search?search_keywords=Ahmed&show_results=posts
In the Topics mode: https://help.forumotion.com/search?search_keywords=Ahmed&show_results=topics
The Result:
No topics or posts met your search criteria.
But this is wrong, because there are already several posts with this name, like this one here:
https://help.forumotion.com/t132777-sound-for-the-notifications-system-for-javascript-experts#892558
Hello Ahmed, I have written ...
I think you need to an external server if you need to a true hashtag system.
For example:
Lets test my name with this search system.. Ahmed
In the Posts mode: https://help.forumotion.com/search?search_keywords=Ahmed&show_results=posts
In the Topics mode: https://help.forumotion.com/search?search_keywords=Ahmed&show_results=topics
The Result:
No topics or posts met your search criteria.
But this is wrong, because there are already several posts with this name, like this one here:
https://help.forumotion.com/t132777-sound-for-the-notifications-system-for-javascript-experts#892558
Hello Ahmed, I have written ...
I think you need to an external server if you need to a true hashtag system.
Ahmed.K- Forumember
- Posts : 349
Reputation : 4
Language : English
Re: Hashtags on forum
What you say are the names. If you title a post with your name, then is you search it then it will find it. This system search threads that have the word written after the #. Not in the posts. I hope you understand.
Re: Hashtags on forum
Hi
Marios, don't ask for this thread to be closed for a bit, please? I believe this can cause a problem with the posting. My image posts barely work and we have to re-size them manually.
Please wait a bit until I managed to confirm this problem and by opening just this one thread, not everyone can have the trouble of creating a new one.
Thank you in advance!
Regards,
Pizza Boi
Marios, don't ask for this thread to be closed for a bit, please? I believe this can cause a problem with the posting. My image posts barely work and we have to re-size them manually.
Please wait a bit until I managed to confirm this problem and by opening just this one thread, not everyone can have the trouble of creating a new one.
Thank you in advance!
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
Ok please DO NOT CLOSE this topic. There is a problem with the image to me as well. I fixed it manuallly but if this can be solved wither way i would be glad to know it! Thanks!
Re: Hashtags on forum
@LG : pretty cool, since this thread isn't closed yet may I ask whether it is possible that it only makes a link IF a user of that name actually exists?
Re: Hashtags on forum
Hi
Lol, knew it wasn't only me. Anyway guys, I made a topic about it here, https://help.forumotion.com/t132944-image-re-size-problem
I'm currently working on it since Ange's busy with in real life situations right now. Hopefully, I can fix this soon since I'm using this code:
And just incorporating this in posts:
As a temporary fix.
This works for punBB only, for other versions, please either create a new topic or private message me so that I can change the selectors.
Regards,
Pizza Boi
Lol, knew it wasn't only me. Anyway guys, I made a topic about it here, https://help.forumotion.com/t132944-image-re-size-problem
I'm currently working on it since Ange's busy with in real life situations right now. Hopefully, I can fix this soon since I'm using this code:
- Code:
/* Redimensionner l'image */
img.resize_img {
max-width: 500px;
max-height: 200px;
}
And just incorporating this in posts:
- Code:
[url=IMG LINK][img]IMG LINK[/img][/url]
As a temporary fix.
This works for punBB only, for other versions, please either create a new topic or private message me so that I can change the selectors.
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
Hi
Some forums would use very big pictures and if they incorporate LGBB, the whole image gets shown and is sometimes cut-off.
How do I put it simply? I'm terribad in English right now. Anyway, this will help re-sizing big images for those who incorporate large pictures like I do (DN Screenshots).
Regards,
Pizza Boi
Some forums would use very big pictures and if they incorporate LGBB, the whole image gets shown and is sometimes cut-off.
How do I put it simply? I'm terribad in English right now. Anyway, this will help re-sizing big images for those who incorporate large pictures like I do (DN Screenshots).
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
Just use this in the css
- Code:
.postbody img {max-width:600px; max-height:300px;}
Re: Hashtags on forum
Hi
That affects all images in the post body. Anyway, my version's the one for re-size since that's the only one I need.
Hopefully LG can see this soon x.x... we're going to have a big tournament soon, lol.
Regards,
Pizza Boi
That affects all images in the post body. Anyway, my version's the one for re-size since that's the only one I need.
Hopefully LG can see this soon x.x... we're going to have a big tournament soon, lol.
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Hashtags on forum
It was just an example.Marios94 wrote:What you say are the names. If you title a post with your name, then is you search it then it will find it.
Lets try another word (not a name this time if you want that):
"Hello" word:
In the Posts mode: https://help.forumotion.com/search?search_keywords=Hello&show_results=posts
In the Topics mode: https://help.forumotion.com/search?search_keywords=Hello&show_results=topics
The Result:
No topics or posts met your search criteria.
But this is wrong, because there are already several posts with this word, like this one here:
https://help.forumotion.com/t132777-sound-for-the-notifications-system-for-javascript-experts#892558
Hello Ahmed, I have written ...
Marios94 wrote:This system search threads that have the word written after the #. Not in the posts. I hope you understand.
Man, this is exactly what I wrote in my previous post.
Ahmed.K wrote:This is not a hashtag system, But you're just looking for any word in the subject title under two modes (Topics/Posts), not in the message content.
For example:
Lets test my name with this search system.. Ahmed
In the Posts mode: https://help.forumotion.com/search?search_keywords=Ahmed&show_results=posts
In the Topics mode: https://help.forumotion.com/search?search_keywords=Ahmed&show_results=topics
The Result:
No topics or posts met your search criteria.
But this is wrong, because there are already several posts with this name, like this one here:
https://help.forumotion.com/t132777-sound-for-the-notifications-system-for-javascript-experts#892558
Hello Ahmed, I have written ...
I think you need to an external server if you need to a true hashtag system.
Ahmed.K- Forumember
- Posts : 349
Reputation : 4
Language : English
Page 2 of 3 • 1, 2, 3
Similar topics
» [New option] Hashtags # on your forum
» Two little add-ons for Hashtags
» hashtags and tags
» How can I make a recent hashtags widget?
» Styling #Hashtags?
» Two little add-ons for Hashtags
» hashtags and tags
» How can I make a recent hashtags widget?
» Styling #Hashtags?
Page 2 of 3
Permissions in this forum:
You cannot reply to topics in this forum