Page no: W78
Explanation |
Video |
Tinytable: ImplementationVideo Name: Auto TinyTable Video Private
in FeedWordpress
We implement both of the ways. For testing purposes we will use Option 1) and then go to option 2) |
|
Tinytable GeneralName of the plugin: Auto Tinytable Name of folder: auto-tinytable (under wp-content/plugins) Name of files: All files under the folder, main important: auto-tinytable.php size: ~1000 rows |
Tiny Table General |
Tinytable algorithmThe algorithm of tinytable is the best part of the whole plugin. It is a independent functionality, which can be called everywhere we want and just transform a bunch of text into tinytable, using params added in the Global GUI. The function firstly read the whole text and analyse it. It divide images and the text. Based on that it makes an empty tiny table (or tables) and start populating content. main variables: $img_array contains the images, the position, the code/name, sizes $articleText: contains the text of whole post
|
Code for Automatic Tinytable |
Splitting by Heading
Next part is a new part, which is responsible for making new rows, when we see h1, h2 or h3 in the code. It must create a new row before the heading and the new row to start with the heading. |
Create New TinyTable Row before Heading Starts |
Splitting by Max Characters (GUI parameter)
First, it populate the images. They are in the second <td> column. Second, it starts dividing the text and populating it. Here is different algorithm, which search for end of sentence in a text and cut the text after XX symbols (controlled by GUI). Then the text is populated.
|
Code for Automatic Tinytable 2 |
BugsLink to NoneLink to None
Add the link
|
Link to None Problem/Solution |
Proper Testing Data
|
See more for