HTML ASP.Net adding hashtag to footer of your blog using keywords
by Mountain Computers Inc., Publication Date: Monday, November 30, 2020
View Count: 1277, Keywords: HTML, ASP, Hashtag, META, Keywords, Hashtags: #HTML #ASP #Hashtag #META #Keywords
I was looking at other company blogs and noticed a footer with the keywords "hashtags: " and a stream of hashtags. I wondered, well, I use keywords as my main SEO and hashtags seem to be the trick in other social media platforms and search engines. This might be old news, yet something I noticed about two weeks ago, and then realized, i need to add the code to myblog.asp footer, right above the paypal donation code.
here is the function and code.
function keywordstohashtag(k)
dim x, h, c
h = "#" 'start the hash string with #
c = 0 'comma found trigger
for x = 1 to len(k)
select case mid(k,x,1)
case ","
c = 1
case " "
if c = 1 then
h = h & " #"
c = 0
end if
case else
h = h & mid(k,x,1)
end select
next
keywordstohashtag=h
end function
Just call the function with your keywords string.
response.write keywordstohashtag("Peace on Earth, Happy New Year, Merry Christmas")
result: #PeaceonEarth #HappyNewYear #MerryChristmas
most keyword strings are separated by commas, and a leading space in the following keywords, and it will return the parsed keyword string with the hashtags and skipping spaces inside keywords words not separated by a command.
more to come...
if you found this article helpful, consider contributing $10, 20 an Andrew Jackson or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.
© 2024 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.