How To Increase The Relative Size Of The Text In The Wordgraph Block?


Subject: How To Increase The Relative Size Of The Text In The Wordgraph Block?
I need to have all the words in the wordgraph to be around 30% bigger, for I'm using a font that is a little smaller than the normal ones.

I figured I'd have to make changes in the "wordgraph.php" file when I saw this in the .tpl file for the wordgraph:

Code: [Download] [Hide] [Select]
<!-- BEGIN wordgraph_loop -->
<span style="font-size: {wordgraph_loop.WORD_FONT_SIZE}"><a href="{wordgraph_loop.WORD_SEARCH_URL}" class="wordgraph" style="font-size: {wordgraph_loop.WORD_FONT_SIZE}px">{wordgraph_loop.WORD}</a></span>
<!-- END wordgraph_loop -->


So I went to wordgraph.php and saw this:

Code: [Download] [Hide] [Select]
foreach ( $words as $word )
{
$ratio = intval(mt_rand(8, 14));
$template->assign_block_vars('wordgraph_loop', array(
'WORD' => ( $board_config['word_graph_word_counts'] ) ? $word . ' (' . $words_array[$word] . ')' : $word,
'WORD_FONT_SIZE' => $ratio,
'WORD_SEARCH_URL' => append_sid(SEARCH_MG . '?search_keywords=' . urlencode($word)),
)
);
}



Can anybody give me a clue on what to do, or where to find help? Thanks in advance.

Profile PM  
Subject: Re: How To Increase The Relative Size Of The Text In The Wordgraph Block?
i would play with this values here

Code: [Download] [Hide]
  1. $ratio = intval(mt_rand(8, 14)); 


make the 8 and 14 bigger

Subject: Re: How To Increase The Relative Size Of The Text In The Wordgraph Block?
I had tried it before. It didn't work ;(

Profile PM  
Subject: Re: How To Increase The Relative Size Of The Text In The Wordgraph Block?
Try this Q-Fix.

Change.

Code: [Download] [Hide] [Select]
<!-- BEGIN wordgraph_loop -->
<span style="font-size: {wordgraph_loop.WORD_FONT_SIZE}"><a href="{wordgraph_loop.WORD_SEARCH_URL}" class="wordgraph" style="font-size: {wordgraph_loop.WORD_FONT_SIZE}px">{wordgraph_loop.WORD}</a></span>
<!-- END wordgraph_loop -->



To this.

Code: [Download] [Hide] [Select]
<!-- BEGIN wordgraph_loop -->
<span style="font-size: 22px;"><a href="{wordgraph_loop.WORD_SEARCH_URL}" class="wordgraph" style="font-size: 22px;">{wordgraph_loop.WORD}</a></span>
<!-- END wordgraph_loop -->


And play with the "22px" - But lets not forget that font-size and settings are Also controlled by browser settings.

Profile PM  
Subject: Re: How To Increase The Relative Size Of The Text In The Wordgraph Block?
I figured I'd have to do this before, of course, but then all the words will have the same size, wouldn't they? =(

Well, it's not important that they have different sizes based on the amount of times they occur on the site, anyway.

Profile PM  
Subject: Re: How To Increase The Relative Size Of The Text In The Wordgraph Block?
Codi wrote: [View Post]
I figured I'd have to do this before, of course, but then all the words will have the same size, wouldn't they?


They shouldn't if you make the numbers different - DID you even TRY it?

But!

I've got around to having a look at this to see why you couldn't change the size as suggested by Spydie.

Depending on where you are and what template is used - the problem is that there are more than one file that needs to be changed.

In these three files.

/wordgraph.php

/includes/forum_wordgraph.php

/blocks/blocks_imp_wordgraph.php

Find:

$ratio = intval(mt_rand(8, 14));

And play with the numbers.

The pic gives you some idea of what to expect in Word-graph (Forum).

untitled

Profile PM  
Subject: Re: How To Increase The Relative Size Of The Text In The Wordgraph Block?
It worked perfectly now. Thank you very much. =)

Profile PM  
Subject: Re: How To Increase The Relative Size Of The Text In The Wordgraph Block?
You're welcome.

Profile PM  
Subject: Re: How To Increase The Relative Size Of The Text In The Wordgraph Block?
hmpf.

should have thought of the other files to edit.

Sorry, but I had my mind on my today´s wedding.


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.1029s (PHP: 17% SQL: 83%)
SQL queries: 10 - Debug Off - GZIP Enabled