The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How can I make these HashTags Widgets?

+2
Ange Tuteur
Van-Helsing
6 posters

Page 1 of 4 1, 2, 3, 4  Next

Go down

Solved How can I make these HashTags Widgets?

Post by Van-Helsing March 31st 2015, 12:55 pm

Hello,
How can I make these two hashtags widgets?

Recent HashTags Widget:
How can I make these HashTags Widgets? 9T5o39E

Popular HashTags Widget:
How can I make these HashTags Widgets? Wu5jO63
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Ange Tuteur March 31st 2015, 4:55 pm

LG is using an external server to store this data in an external database. You'd need a knowledge of PHP, MySQL, and JavaScript to achieve said effect. You could use the topic method of storing data as well.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing March 31st 2015, 5:39 pm

Hello @Ange Tuteur,
There are to methods to develop this, the one is with an external server which I can found easily a little server to host some scripts and a little MySql database, and other method which we tried at the past is pseudo-database which the hashtags will grabbing into a topic which it will use as database.

I dont know how to grab the hashtags from the topic in second method and write them into pseudo-database. The first method has a lot of work in programming languages. I think the second method is more simple than the first.

Now I think another method:
a javascript field which it will displaying while posting something similar with "Reason for Editing" with the name "HashTags" and the user fill it before press the button "Send". Then the javascript writes the hashtags into pseudo-database.
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Ange Tuteur March 31st 2015, 6:02 pm

Identifying hashtags is rather trivial. There's two things to note :

1. Hashtags and Mentions are the only links in posts to have a title, IF HTML is disabled.
2. Hashtags always begin with a hash or pound

So, this is a simple example of iterating all anchors on the page to find those which are a hashtag. It's spaced out for readability.
Code:
// start with a jQuery document ready event to execute code when the document is loaded
$(function() {
 
  var a = document.getElementsByTagName('A'), // get all links in the document
      i = 0, // link index ; 0 is the first link, 1 is the second, and so on..
      j = a.length; // define link length so it doesn't need to be looked up after each iteration
 
 
  for (;
        i<j; // continues iteration until all links have been looped
        i++ // increments our index after each loop
      )
   
      {
   
        if (
            a[i].title // only hashtags and mentions have titles if HTML is disabled
            && // and
            /^#/.test(a[i].innerHTML) // hastags always begin with a pound or "hash"
            // if these two conditions are true, we can execute code specifically for them
          )
     
          {
     
            a[i].className += ' fa-hashtag'; // add classname .fa-hashtag
       
          }
   
      }
 
});


What can be done to store the hashtags is pretty simple as well. We make a query to the database after the iteration is complete with all hashtags that were found and the post ID which they were contained in. Basically there will be two columns for the database :

1. Hashtag
- The name of the hashtag

2. Post ID array
- A list of post id's where this hashtag occurred.

A user may tag it more than once in a post, so we could add some brackets to the end of the post ID to hold the number of times it was tagged. e.g. t1p72[3]

broken down :
t1 // topic id
p72 // post id
[3] // number of times tagged in that post

It sounds simple, but there is a lot more to this to make sure it succeeds. Furthermore, you have a character limit of 65,000, so this can hinder the amount of data you store via a post. At the moment, I've not had time to dedicate to developing something like this, but I've thought about it.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing March 31st 2015, 6:29 pm

To prevent the limit of 65,000 characters of post we can keep a specific number of the latest hashtags in the pseudo-database etc. 1000-5000 hashtags or any custom number of hashtags as records in pseudo-database by overwriting the oldest records.
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by JScript March 31st 2015, 7:15 pm

Ange Tuteur wrote:(...) you have a character limit of 65,000 (...)
In practice the character limit is only 15,000!
I have confirmed in my tests...

JS
JScript
JScript
Forumember

Male Posts : 741
Reputation : 175
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing March 31st 2015, 10:02 pm

JScript wrote:
Ange Tuteur wrote:(...) you have a character limit of 65,000 (...)
In practice the character limit is only 15,000!
I have confirmed in my tests...

JS
How can happening this?
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 1st 2015, 10:05 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 2nd 2015, 11:36 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 4th 2015, 12:10 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 5th 2015, 12:53 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 6th 2015, 3:14 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 8th 2015, 1:50 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 9th 2015, 2:59 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 10th 2015, 10:21 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 12th 2015, 4:54 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 13th 2015, 9:36 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 15th 2015, 1:11 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 16th 2015, 1:46 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 17th 2015, 2:15 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 18th 2015, 10:52 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 20th 2015, 12:32 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 23rd 2015, 3:22 am

bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 24th 2015, 3:24 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 25th 2015, 7:10 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 27th 2015, 1:30 am

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 29th 2015, 10:42 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing April 30th 2015, 10:47 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing May 1st 2015, 11:19 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I make these HashTags Widgets?

Post by Van-Helsing May 2nd 2015, 11:43 pm

Bump
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Page 1 of 4 1, 2, 3, 4  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum