Biplob_Mondol
A Hash tag label or metadata tag and it is commonly used by social network sites and blogs.users can create by placing '
#' before/infront of a word or unspaced phrase.Hashtag use to find specific content or thread tagged with it. And it also use for social activism,collecting data,and some persons use it as coloring text(mostly on facebook users use to write a blue text,it become blue because of hashtags will be convert to link.they use it because of they don't know).
On wapka it made by users as bbcode using javascript or jquery.i can say they use it without understanding it.a thing to say this is when hashtag is clicked it will redirect to error page or it reload the page.but it is not hashtag a right function.
.
To avoid that type mistakes today i will introduce you with my new project.i hope it will be helpful to you.
.
Introduction
wapka hashtag v1 can be used for blog and simple forum(shout box).in this tut i give for blog if you want to use for shout box you only need to change
:bloglist: wapka tag to
:forumlist:
.
Copyright
this code copyright is for
ethio-pic.tk. when you share this tut to other you must give credit for my site.
.
Requirements
your blog list
%text% variable must be cover by
name="hash" like this
.
<span class="hash" name="hash">
%text%
</span>
Copy code
.
#hashtag bbcode js
under the bloglist/forumlist code or on footer page( default site -2 ) add this javascript
.
<script language="javascript"> msg=document.getElementsByName("hash").length; for(h=0;h<msg;h++) { hi=document.getElementsByName("hash")[h].innerHTML; hi=hi.replace(/#([a-zA-Z0-9-_^.-?!/]+)/ig,'<a href="site_hash.php?get-hash=$1:admin-hash-amp:">#$1</a>'); document.getElementsByName("hash")[h].innerHTML=hi;} </script>
Copy code
.
Hash search result page
Create one page and give it url name '
hash' because the url should be like this
site_hash.xhtml it is important.
Next on this page add this code it show search result for hashtag
.
<div class="sub_header"><b>Hash</b><br/> Result for <b>#:get-hash(hash):</b> </div><div name="john" class="text con"><div name="hashs"></div> </div>
:bloglist:l=50,s=1,o=n,t=--:: <script language="javascript"> old=$("div[name='hashs']").html(); t="%text%"; tex='<div class="list hash" name="high">%lname%<br/><l>Posted %time%</l><br/> '+t+'</div>'; show=old+tex; if(t.match(/#:get-hash(hash):/)) {$("div[name='hashs']").html(show);} else {$("div[name='hashs']").html(no);} </script>:: :/bloglist:
Copy code
.
Finishing
If finally it didn't work because of your site doesn't have google jquery pluggin.to make it alive add this on head tag
.
<script src=" http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
Copy code
.
.
* when you share this topic to others give a credit for my site.if you do that i will share more tutorials.