Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8526765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:22:02+00:00 2026-06-11T08:22:02+00:00

Tag System I’m Using (Link) Simply put the inline tag is never replaced by

  • 0

Tag System I’m Using (Link)

Simply put the inline tag is never replaced by the cloud

I have my JS loading in from a folder (links confirmed)

<script type="text/javascript" src="/jquery/jqquery-1.7.2.js"></script>
<script type="text/javascript" src="/jquery/jqcloud-1.0.1.js"></script>
<link rel="stylesheet" href="/jquery/jqcloud.css" type="text/css" media="screen">

and then i use some PHP to generate the tag array

<script type="text/jscript">
var word_list = [
<?
foreach ($array as $key => $value) {
if ($value == $average) { $weight = 2;} 
else if ($value > $average) { $weight = 3;} 
else if ($value < $average) { $weight = 1;}
if (strlen($key) > 1 ){
  echo "{text: \"".$key."\", weight:".$weight.", url: \"http://myurl.com/tags/".$key."\", title: \"".$value."\"}";
  $total -= 1;
  if ($total == 0) echo ",";
}
}
?>
];
$(document).ready(function() {
    $("#wordcloud").jQCloud(word_list);
});

Yet all i have is an empty div in my tag section

http://jsfiddle.net/K28Mc/ Functioning example

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:22:03+00:00Added an answer on June 11, 2026 at 8:22 am

    The problem appears to be that you never close your array:

    var word_list = [ // <-Note this character..
    <?
    foreach ($array as $key => $value) {
    if ($value == $average) { $weight = 2;} 
    else if ($value > $average) { $weight = 3;} 
    else if ($value < $average) { $weight = 1;}
    if (strlen($key) > 1 ){
      echo "{text: \"".$key."\", weight:".$weight.", url: \"http://myurl.com/tags/".$key."\", title: \"".$value."\"}";
      $total -= 1;
      if ($total == 0) echo ",";
    }
    }
    ?>
    }; //<------- Right here, you fail to close the array.  This should be a ].  I have a feeling this is breaking everything else.
    $(document).ready(function() {
        $("#wordcloud").jQCloud(word_list);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Radius Tag System (from the RadiantCMS) for a content engine
I'm using the tag-it library for jquery to make a tagging system (a bit
I'm currently writing a tag cloud system. So I wrote the following sql schema
I have a basic tag searching system setup, each tag has a field for
I'm using link tag to open a pdf file. when clicking that link, the
I trying to make tag cloud system and i enter the tags in one
I'm creating a simple tag system that allows me to link a tag to
If I have a tag system like Stackoverflow. I can add tags, save and
I'm looking to set up a tag system using this normalised table structure: Table:
I have to share tag from one device to other, i have android 2.3.3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.