Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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.
 



 
Codi - View user's profileSend private message 
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post 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
 




____________
Driving me and my PC crazy, trying to create some pluggins
Icy-Mods.com ( IP 2.0 RC-1)
 
spydie - View user's profileSend private messageVisit poster's website 
Back to topPage bottom
Reply with quote Download Post 
Post Re: How To Increase The Relative Size Of The Text In The Wordgraph Block? 
 
I had tried it before. It didn't work ;(
 



 
Codi - View user's profileSend private message 
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 




____________
My advice is freely given on the assumption that you will ignore any part or all of it!
My Hobby
 
mort - View user's profileSend private messageVisit poster's website 
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
Codi - View user's profileSend private message 
Back to topPage bottom
Reply with quote Download Post 
Post 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
 




____________
My advice is freely given on the assumption that you will ignore any part or all of it!
My Hobby
 
mort - View user's profileSend private messageVisit poster's website 
Back to topPage bottom
Reply with quote Download Post 
Post Re: How To Increase The Relative Size Of The Text In The Wordgraph Block? 
 
It worked perfectly now. Thank you very much. =)
 



 
Codi - View user's profileSend private message 
Back to topPage bottom
Reply with quote Download Post 
Post Re: How To Increase The Relative Size Of The Text In The Wordgraph Block? 
 
You're welcome.
 




____________
My advice is freely given on the assumption that you will ignore any part or all of it!
My Hobby
 
mort - View user's profileSend private messageVisit poster's website 
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 




____________
Driving me and my PC crazy, trying to create some pluggins
Icy-Mods.com ( IP 2.0 RC-1)
 
spydie - View user's profileSend private messageVisit poster's website 
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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