Navigation

Pligg Support

** ATTENTION YANKIDANK **
I committed it on my forked pligg too.
**
table_tags and table_tag_cache are updated in two cases:

1. Upon submitting a new story.
2. Every time a story is edited.

In the first case, in \submit.php, LINE 428, we find a call to a function in the \libs\tags.php file: tags_insert_string($linkres->id, $dblang, $linkres->tags);

However, at this stage the status of the story being submitted is still ‘discard’, while in the Function tags_insert_string, it specifically selects from table_links only the links that meet the status of published or new, therefore the new tags entered for story being submitted won’t be included and won’t appear in the tag cloud until the next submit (and again the newest tags won’t be included) or when the admin deletes the discarded stories from the admin section and automatically rebuilds the table_tag_cache.

After following the logic of the process, the best place to call the Function tags_insert_string is after we make sure that the story’s status is set to publish:

1. In \submit.php, LINE 428, comment or remove this code:

tags_insert_string($linkres->id, $dblang, $linkres->tags);

2. On LINE 517, after
function do_submit3() {

change this: global $db;

To this: global $db, $dblang;

Because we need the database language for the table_tags entries

3. On LINE 549, right after:

$linkres->check_should_publish();

Add this (the code we commented or removed in step 1)

tags_insert_string($linkres->id, $dblang, $linkres->tags);

4. Save and close.

Now, we made sure that the tag and tag_cache tables are always in sync and therefore the tag cloud page and the sidebar tag cloud will reflect the accurate count and size of each tag!
No one has provided an answer to this question yet. Care to be the first?

Who Upvoted this Story

Pligg.com's Support area is where you can ask questions and get answers. Just getting started with the Support area? This section describes tips for participating.

Submitting a Question or Comment

By taking a minute to research previous posts you may receive an answer much faster than waiting for a response to a new question. Begin by searching the support section for an answer. Sometimes you may even want to extend your search to the entire pligg.com domain.

If you are unable to find a relevant answer, submit a new question or comment here. Please provide a detailed description and, when necessary, debugging information such as your server environment (a link to a <?php phypinfo(); ?> .php page would be very helpful), your web browser, and any steps necessary to reproduce your issue.

Submitting an Answer

If you have an answer or useful response that you would like to add to a post, you can submit it as a comment which other users will then vote on. Answers are sorted by most popular to least, allowing the best information to climb to the top of the page.

Please read and vote for existing answers before submitting your own, as there may already be an acceptable answer provided. You can use the "Reply" link found within an answer to submit a response to it, in case you want to expand or comment on someone else's contribution.

Including Files or Code

Sometimes it is necessary for you to attach a file or include a snippet of code for others to reference in your response. In most cases, you can .zip up files and attach them to a question or answer using Pligg's file manager. At times though this may fail, and in these circumstances we recommend using a third party host. Below we are including a list of recommended websites where you can share easily share file uploads (or snippets of code) through the web.