Español Français Deutsch Italiano Nederlands Svenska Dansk Japanese Chinese (Simplified) Russian
 
AVForums.com twitter AVForums is a member of CEDIA. THX certified reviewer.  Click for more information. AVForums reviewers are ISF Certified.  Click for more information.
 
The UK's biggest and best home entertainment electronics forums  
4 million visitors each month


Forums Register Blogs Information Social Groups Search Today's Posts Mark Forums Read
Go Back   AVForums.com > Lifestyle Topics > General Chat

Latest AVForums Movie Reviews
My Bloody Valentine - Special Edition Blu-ray ReviewThe Universe: Complete Season One Blu-ray ReviewTerminator Salvation Blu-ray Review20th Century Boys: Chapter 2 - The Last Hope Blu-ray ReviewNorth By Northwest (50th Anniversary Edition Blu-ray Book) Blu-ray Review
Scrooge (A Christmas Carol) Blu-ray ReviewGray Lady Down - Original Motion Picture Soundtrack CD ReviewUp Blu-ray ReviewLéon Blu-ray ReviewNear Dark Blu-ray Review

Similar Threads
thread Thread Starter Forum Replies Last Post
HD`S Coding twiglet Movies and TV Programmes On Disc and Downloaded 3 01-01-2008 12:51 PM
HD`S Coding twiglet Xbox 360 HD DVD drive 5 31-12-2007 5:43 PM
De Coding DVD mikejb DVD Players 0 30-12-2002 3:14 PM
DVD coding mulder DVD Players 1 09-12-2002 11:26 PM
rce coding acmac80 DVD Players 1 16-01-2002 1:07 PM

Reply
 
Thread Tools Display Modes
Old 16-11-2008, 3:54 PM   #1 (permalink)
Super Moderator
 
Ian J's Avatar
 
Join Date: Aug 2001
Location: Midlands
Posts: 14,940
Thanks: Gave 1,464, Got 2,443
Blog Entries: 2
Help with php coding please

I am struggling along with my Wordpress blog and am slowly but surely getting there. I am hamstrung by the fact that whilst I can muddle through simple html I don't understand php at all.

I have a problem with one of the sidebars as it includes "Popular Tags" which I quite like but I don't like the way that the more a tag has been used the larger the tag appears in the sidebar. This is helped by the fact that the most used tag is four words totalling about 40 characters and the tag is so large that it's off the page.

I am attaching the coding for the sidebar in the hope that making the tags all the same size is something fairly simple and I have coloured in red the section that I think is relevant although I may be miles out.

Quote:
<div class="sidebar last"><!--Sidebar Right -->
<div id="sub_feed">
<a href="<?php bloginfo('rss2_url');?>">
<img src="<?php bloginfo('template_url'); ?>/images/subscribe180x40.jpg"></a><!-- Enter Your Feed URL Here -->
</div>
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
<div class="box"><!--search-->
<h3>Search</h3>
<div class="row">
<input type="text" value="<?php the_search_query(); ?>" class="search" name="s" id="s" size="20" />
<input type="image" id="submit" src="<?php bloginfo('template_url'); ?>/images/go.gif" value="submit" class="submit" />
</div>
<div class="clear"></div>
<div class="cap"></div>
</div><!--/Search box-->
</form>
<div class="box" id="subscribe"> <!--subscriber-->
<h3>Subscribe</h3>
<ul>
<li id="s-yahoo"><a href="http://add.my.yahoo.com/rss?url=<?php bloginfo('rss2_url');?>">Yahoo</a></li>
<li id="s-google"><a href="http://fusion.google.com/add?feedurl=<?php bloginfo('rss2_url');?>">Google</a></li>
<li id="s-bloglines"><a href="http://www.bloglines.com/sub/<?php bloginfo('rss2_url');?>">Bloglines</a></li>
<li id="s-newsgator"><a href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=<?php bloginfo('rss2_url');?>">newsgator</a></li>
<li id="s-rss"><a href="<?php bloginfo('rss2_url');?>">RSS</a></li>
</ul>
<!-- Uncomment Below Code for Email Base Subscription -->
<!--<div class="box" id="mailinglist">
<h4>Subscribe By Email</h4>
<form id='mailinglist_form' method="post" action="">
<input type="text" name="email" value="" class="email" />
<input type="image" src="<?php bloginfo('template_url'); ?>/images/add.gif" value="Sign Up" name="email-button" />
</form>
</div> -->
<div class="cap"></div>
</div><!--/Subscribe box-->
<div class="box">
<h3>Categories</h3>
<ul>
<?php wp_list_categories('show_count=1&title_li='); ?>
</ul>
<div class="cap"></div>
</div><!--/Catagory box -->
<div class="button" id="bookmark">
<a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?wt=nw&pub=deannab&url='+encodeURIComp onent(location.href)+'&title='+encodeURIComponent( document.title), 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,re sizable=yes,toolbar=no,location=no,status=no,scree nX=200,screenY=100,left=200,top=100'); return false;" title="Bookmark using any bookmark manager!" target="_blank">Bookmark</a>
</div><!--/bookmark-->
<!-- Widgetized right sidebar -->
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar('right_sidebar') ) : ?>
<?php endif; ?>
<div class="box" id="tagcloud">
<h3>Popular Tags</h3>
<ul>
<?php wp_tag_cloud('smallest=8&largest=18&number=30&orde rby=count&order=DESC'); ?>
</ul>
<div class="cap"></div>
</div><!--/tagcloud box-->
<div class="box" id="archives">
<h3>Archives</h3>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<div class="cap"></div>
</div><!--/archive box-->
</div><!--/sidebar-->
__________________
Ian

Opinions expressed by myself are not necessarily those of AV Forums
Ian J is offline   Reply With Quote
Old 16-11-2008, 4:03 PM   #2 (permalink)
Member
 
Join Date: Jan 2006
Posts: 63
Thanks: Gave 6, Got 59
Re: Help with php coding please

I don't know php, but I'd try this:
<?php wp_tag_cloud('smallest=8&largest=8&number=30&order by=count&order=DESC'); ?>
RichardK is offline   Reply With Quote
Old 16-11-2008, 4:40 PM   #3 (permalink)
Super Moderator
 
Ian J's Avatar
 
Join Date: Aug 2001
Location: Midlands
Posts: 14,940
Thanks: Gave 1,464, Got 2,443
Blog Entries: 2
Re: Help with php coding please

Richard - it is rather obvious when you look closely at it. Thanks very much as it worked a treat.

The only other problem that I would like to address is that even with the tags now all the same size one or two are still too long for the sidebar and stick out of the right had side rather than wrap round. If there is no cure for that I suppose I can live with it.

Thanks again
__________________
Ian

Opinions expressed by myself are not necessarily those of AV Forums
Ian J is offline   Reply With Quote
Old 16-11-2008, 5:05 PM   #4 (permalink)
Member
 
Paul_HDLover's Avatar
 
Join Date: Jan 2007
Location: Edinburgh
Posts: 324
Thanks: Gave 171, Got 77
Re: Help with php coding please

Ian where are you getting the popular tags values from? I cant see them in the above code?
__________________
Sammy 40" & 37" LCD's, Sammy HTA710 Receiver, Amp & Sub with 6:1 surround Sound, Sky HD, HTPC with 1.5tb HD's, LG GGC H20L Blu Ray & HD-DVD Roms, Nvidea 8600GT HDMI, Xbox 360 (Bust )
Paul_HDLover is offline   Reply With Quote
Old 16-11-2008, 5:23 PM   #5 (permalink)
Super Moderator
 
Ian J's Avatar
 
Join Date: Aug 2001
Location: Midlands
Posts: 14,940
Thanks: Gave 1,464, Got 2,443
Blog Entries: 2
Re: Help with php coding please

I haven't a clue as I don't understand php or SQL at all but they are definitely appearing on the blog sidebar
__________________
Ian

Opinions expressed by myself are not necessarily those of AV Forums
Ian J is offline   Reply With Quote
Old 16-11-2008, 5:40 PM   #6 (permalink)
Member
 
Paul_HDLover's Avatar
 
Join Date: Jan 2007
Location: Edinburgh
Posts: 324
Thanks: Gave 171, Got 77
Re: Help with php coding please

linky?
__________________
Sammy 40" & 37" LCD's, Sammy HTA710 Receiver, Amp & Sub with 6:1 surround Sound, Sky HD, HTPC with 1.5tb HD's, LG GGC H20L Blu Ray & HD-DVD Roms, Nvidea 8600GT HDMI, Xbox 360 (Bust )
Paul_HDLover is offline   Reply With Quote
Old 16-11-2008, 7:14 PM   #7 (permalink)
Senior Member
 
WibXL's Avatar
 
Join Date: May 2006
Posts: 1,235
Thanks: Gave 179, Got 259
Re: Help with php coding please

Quote:
Originally Posted by Paul_HDLover View Post
Ian where are you getting the popular tags values from? I cant see them in the above code?
The tag values are generated by a separate plugin which then displays them in the sidebar using the code in red.
__________________
Any advice I may give is given in good faith but may be incorrect so listen to what other people have to say as well and don't blame me when it all goes tits up.
WibXL is offline   Reply With Quote
Old 16-11-2008, 7:29 PM   #8 (permalink)
Senior Member
 
WibXL's Avatar
 
Join Date: May 2006
Posts: 1,235
Thanks: Gave 179, Got 259
Re: Help with php coding please

Quote:
Originally Posted by Ian J View Post
The only other problem that I would like to address is that even with the tags now all the same size one or two are still too long for the sidebar and stick out of the right had side rather than wrap round. If there is no cure for that I suppose I can live with it.
If you can't find out how to do it with the plugin or code itself and depending on the theme used you may be able to increase the width of the sidebar slightly to make the text fit but this may throw your sites design out of whack and if images are used for the sidebar it won't look too good.

The width of the sidebar is probably contained in style.css so have a look in there if you want to give it a try and it'll be in the sidebar section saying something like width:180px;

EDIT: Failing that you could just install a different tag cloud generator from the Wordpress plugins directory.
__________________
Any advice I may give is given in good faith but may be incorrect so listen to what other people have to say as well and don't blame me when it all goes tits up.

Last edited by WibXL; 16-11-2008 at 7:43 PM.
WibXL is offline   Reply With Quote
Thanks from:
Ian J (17-11-2008)
Old 17-11-2008, 8:53 AM   #9 (permalink)
Super Moderator
 
Ian J's Avatar
 
Join Date: Aug 2001
Location: Midlands
Posts: 14,940
Thanks: Gave 1,464, Got 2,443
Blog Entries: 2
Re: Help with php coding please

Thanks Wib. I did take your suggestion and looked at alternative plugins but they all looked a bit complicated so I just edited the sidebar and removed all of the coding for the tags so now it doesn't appear at all which doesn't really worry me.
__________________
Ian

Opinions expressed by myself are not necessarily those of AV Forums
Ian J is offline   Reply With Quote
Old 17-11-2008, 9:10 AM   #10 (permalink)
Senior Member
 
WibXL's Avatar
 
Join Date: May 2006
Posts: 1,235
Thanks: Gave 179, Got 259
Re: Help with php coding please

No problem, was it the plugins themselves that looked complicated or installing them as there is another plugin that will automate the process for you and to install it is just a matter of unzipping it and then uploading it to your plugins folder.
__________________
Any advice I may give is given in good faith but may be incorrect so listen to what other people have to say as well and don't blame me when it all goes tits up.
WibXL is offline   Reply With Quote
Old 17-11-2008, 10:30 AM   #11 (permalink)
Super Moderator
 
Ian J's Avatar
 
Join Date: Aug 2001
Location: Midlands
Posts: 14,940
Thanks: Gave 1,464, Got 2,443
Blog Entries: 2
Re: Help with php coding please

I can manage to install plugins but sometimes I get defeated by setting them up afterwards as I don't understand the instructions. I've installed a couple of interesting looking plugins so far that I can't get to work as I don't understand the setup options.

Still, it's good fun learning
__________________
Ian

Opinions expressed by myself are not necessarily those of AV Forums
Ian J is offline   Reply With Quote
Old 17-11-2008, 10:53 AM   #12 (permalink)
Senior Member
 
WibXL's Avatar
 
Join Date: May 2006
Posts: 1,235
Thanks: Gave 179, Got 259
Re: Help with php coding please

Since setting up my new blog I've been trying to stick to plugins that come with a built in sidebar widget as you don't need to edit any code yourself but some of the instructions can be lacking in places. I tend to just mess about with any options that I don't understand to see what they do and hope that I don't break anything in the process.

If you're going to take that approach though backing up your site first would be a good idea but most of the time any problems can be solved simply by deleting the messed up plugins folder.

It'd be nice of all of the plugin settings pages were in the same place as at the moment they seem to be everywhere which doesn't help.
__________________
Any advice I may give is given in good faith but may be incorrect so listen to what other people have to say as well and don't blame me when it all goes tits up.
WibXL is offline   Reply With Quote
Old 18-11-2008, 5:33 PM   #13 (permalink)
Super Moderator
 
Ian J's Avatar
 
Join Date: Aug 2001
Location: Midlands
Posts: 14,940
Thanks: Gave 1,464, Got 2,443
Blog Entries: 2
Re: Help with php coding please

I'm stuck again.

I would like a facility that shows if there are any comments for each blog post and preferably that you can click on to take you to view them.

At the moment there is no way of knowing if there are any comments or not for a given post unless you click the header to be taken to that page. I am worried that people will stop visiting and posting comments if they think that they are not appearing.
__________________
Ian

Opinions expressed by myself are not necessarily those of AV Forums
Ian J is offline   Reply With Quote
Old 18-11-2008, 5:49 PM   #14 (permalink)
Veteran Member
 
signs's Avatar
 
Join Date: Nov 2005
Location: nr burton on trent
Posts: 6,465
Thanks: Gave 808, Got 997
Re: Help with php coding please

Quote:
Originally Posted by Ian J View Post
I'm stuck again.

I would like a facility that shows if there are any comments for each blog post and preferably that you can click on to take you to view them.

At the moment there is no way of knowing if there are any comments or not for a given post unless you click the header to be taken to that page. I am worried that people will stop visiting and posting comments if they think that they are not appearing.

Pm Bob (Mr incredible) he's hot on this i believe
__________________
XBOX 360 paramount signs PSN Paramountsigns

Lines .. i must not be confrontational, i must not be confrontational,i must not be confrontational i must not be confrontational,i must not be confrontational,
signs is offline   Reply With Quote
Thanks from:
Ian J (18-11-2008)
Old 18-11-2008, 6:24 PM   #15 (permalink)
Senior Member
 
WibXL's Avatar
 
Join Date: May 2006
Posts: 1,235
Thanks: Gave 179, Got 259
Re: Help with php coding please

Quote:
Originally Posted by Ian J View Post
I'm stuck again.

I would like a facility that shows if there are any comments for each blog post and preferably that you can click on to take you to view them.

At the moment there is no way of knowing if there are any comments or not for a given post unless you click the header to be taken to that page. I am worried that people will stop visiting and posting comments if they think that they are not appearing.
You could use a theme that already has the facility built in, I use Aerodrome from here and it works pretty well for that. Or you could use the recent comment widget that's built in to Wordpress to show say ten recent comments in your sidebar. That can be found in dashboard>design>widgets.

There is also a plugin that will allow your users to recieve comment updates via email but I can't remember the name of it at the moment. One of the easiest ways though would be to try to get your users to sign up to your comments RSS feed to have the comments sent straight to a RSS reader.

EDIT: The plugin is called subscribe to comments but it looks like there might be problems with it when used with the lastest version of wordpress.
__________________
Any advice I may give is given in good faith but may be incorrect so listen to what other people have to say as well and don't blame me when it all goes tits up.

Last edited by WibXL; 18-11-2008 at 6:27 PM.
WibXL is offline   Reply With Quote
Thanks from:
Ian J (19-11-2008)



Bookmarks

Tags
coding, php
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT. The time now is 11:43 AM.

AV Forums
Optimised for Firefox.
RSS Feed
AVForums.com is owned and operated by M2N Limited.
Copyright © 2000-2009 M2N E. & O. E.
Global Gold
Web Hosting