here's a bit of code to get the tag cloud displayed and add it to the tag text box.
You can make this better, but if you do please post the changes you've made to share with everyone.
in submit.php
Find these lines:
PHP Code:
$main_smarty->assign('lastspacer', 0);
$main_smarty->assign('cat_array', $array);
and add this below those lines.
PHP Code:
$cloud=new TagCloud();
$cloud->smarty_variable = $main_smarty; // pass smarty to the function so we can set some variables
$cloud->word_limit = tags_words_limit_s;
$cloud->min_points = tags_min_pts_s; // the size of the smallest tag
$cloud->max_points = tags_max_pts_s; // the size of the largest tag
$cloud->show();
$main_smarty = $cloud->smarty_variable; // get the updated smarty back from the function
This will create the tag cloud and pass the tag cloud info on to the template engine.
in submit_step_2.tpl
Find these lines.
PHP Code:
<strong>{#PLIGG_Visual_Submit2_Tags_Inst1#}</strong> {#PLIGG_Visual_Submit2_Tags_Example#} <em>{#PLIGG_Visual_Submit2_Tags_Inst2#}</em><br/>
<input type="text" id="tags" name="tags" value="{$tags_words}" size="60" maxlength="40" /><br /><br />
below that add this.
PHP Code:
<label>Top Tags:</label>
<strong>Click on a tag to add</strong><br/>
{literal}
<script language="javascript" type="text/javascript">
function addTag(tag_string)
{
var tagsTextBox = document.getElementById('tags');
var middleBit = '';
var tagsTextBoxValue = tagsTextBox.value;
var tagsTextBoxLength = tagsTextBoxValue.length;
if(tagsTextBoxLength == 0)
{
middleBit = '';
}else{
middleBit = ', ';
}
tagsTextBox.value = tagsTextBox.value + middleBit + tag_string;
}
</script>
{/literal}
<div id="tagcloud" style="margin: 5px 0 0 0; line-height: {php} echo tags_max_pts_s; {/php}pt;">
{section name=customer loop=$tag_number}
{* --- to change the way the words are displayed, change this part --- *}
<span style="font-size: {$tag_size[customer]}pt">
<a href="javascript:addTag('{$tag_name[customer]}');">{$tag_name[customer]}</a>
</span>
{* --- --- *}
{/section}
</div>
You can change the look and feel, how the javascript should interact and other changes. Post what changes you've made to share with everyone.