Rose
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to remove Admin/User Bar on WordPress 3.1?Which version of the code above did you try?
Forum: Fixing WordPress
In reply to: How to remove Admin/User Bar on WordPress 3.1?Try putting this in your theme’s function.php:
remove_action('init', 'wp_admin_bar_init');
If you also want to remove the enable/disable option in user preferences, try this instead:
<?php function hide_admin_bar_settings() { ?> <style type="text/css"> .show-admin-bar { display: none;} </style> <?php } function disable_admin_bar() { add_filter( 'show_admin_bar', '__return_false' ); add_action( 'admin_print_scripts-profile.php', 'hide_admin_bar_settings' ); } add_action( 'init', 'disable_admin_bar' , 9 ); ?>
Hiya! Glad that we can be of help! ?? FLV support has now been added. Just update the plugin or download and you’ll be all good ^^
There’s a slight error in the code
is_category('blog') || (is_single() && in_category('blog')
You need to get rid of the ‘(‘ beside is_single so it looks like:
is_category('blog') || is_single() && in_category('blog')
Try that – I don’t know if that will solve your problem but I copy pasted in that code too and didn’t notice the bracket in the wrong place till it spat out an error.
Rather ironically the .htaccess line I had above did NOTHING lol. I tried installing this plugin just to see if it worked and it did. Very odd. I can’t fathom then why others would have an issue given I’m running WordPress 3.01.
The only thing I could think of that may alter things is that I have a custom permalink structure of: /%year%/%category%/%postname%.html I don’t normally bother with the .html on the end. Perhaps try adding that and see if it makes a difference?
Forum: Fixing WordPress
In reply to: Help with SimpleModal Contact Form (SMCF)You shouldn’t need to manually load it into the footer as the plugin will do this automatically.
Open your theme’s footer.php file and scroll to the bottom.
You should either see wp_footer(); or <?php wp_footer(); ?> just before the </body> tag.
e.g.
</div> <!-- footerwrapper end --> <?php wp_footer(); ?> </body> </html>
If you can’t see it there, you will need to add it in ??
@pnelsen I did this by altering smcf.php by changing line (about) 209 to this:
if (get_option("smcf_form_subject") == 1) { $output .= " <input type='hidden' id='smcf-subject' class='smcf-input' name='subject' value='". single_post_title('Enquiry about ', false) . "' readonly='readonly' tabindex='1003' />";
You will probably need to change the “single_post_title” to whatever type of page you have as single_post_title is specific to (funnily enough) the title of a single post page (the_title may work, but I don’t remember as that can only be used within the loop).
@mike You can do the same thing above – just add
value='". single_post_title('Enquiry about ', false) . "'
to the <textarea id=’smcf-message’> on line (about) 215 (bearing in mind that you will also need to change single_post_title to whatever type of page it is.@lefever LOL. Well, glad to hear it’s working for you! I wonder if that’s why it’s going screwy on my Chrome as well given I have the AdBlock extension for it >.<
And it’s no problem at all. I always try to pass on the helpful little tidbits of code I discover whilst working on WordPress sites ??
@nathan12343 Ah, I see exactly what you mean! Try adding:
.ngg-slideshow {margin:0 auto !important;}
to either your template’s stylesheet or NGG’s style. Tested it in Firefox, Chrome, Safari and IE7&8 and worked for me on all ??
@nathan12343 Which version of nggallery are you using? If you look at the site I linked, none of the images get absolutely positioned. Maybe it’s the NGG style you are using? The one I have activated on that site is “Shadow Effect” (ngg_shadow.css). I would try setting the wordpress template to Twentyten and also the NGG style to the default and seeing if it makes a difference. At least then you might know whether it’s one or both of the templates messing with things.
@lefever Rather ironically I am getting that problem in Chrome but not in Safari or Firefox lol. What lightbox are you using? Just the default one or a different one? The last time I had problems like you was with the lightbox script itself. Personally I use Shadowbox JS (https://www.ads-software.com/extend/plugins/shadowbox-js/) which seems to work flawlessly on my site. You could try switching NGG to use either a different one that it comes with (Shutter or Thickbox) or install another one like Shadowbox JS (setting NGG’s javascript effect to “Lightbox”) and seeing if that makes any difference.
<div align=”center”> is technically deprecated so prolly not a good idea to use it.
@lefever, I’ve not had the problem of the gallery forcing itself down the bottom. I’ve tested the current site I am working on across Firefox, IE7 and IE8, Chrome and Safari with no problems. The only thing I could think of at this point would be that it is an issue with the wordpress template. Have you tried changing it to something like Twentyten to see if that makes a difference?
Can you link me your site and I will have a look at it.@nathan12343 To center align images I did this:
html:
<div id="container"> <div class="imagebox"> <img /> </div> </div>
css:
div#container { width:100%; text-align:center; !important} div.imagebox { width:150px; display:inline-block; margin:0 auto; !important}
(width can be whatever you need)
This works for all the browsers I test on except IE7. I haven’t found a good solution for IE7 but I don’t tend to bother with perfection for an outdated browser that only 7% of people still use (I replaced display:inline-block with float:left using an style-ie7.css stylesheet and conditional comments to target IE7 and IE7 users can lump it or leave it).You can see an example of this here: https://demo.liquidsilver.net.nz/moniqueendt/gallery/ (album view listing galleries)
https://demo.liquidsilver.net.nz/moniqueendt/nggallery/page-8/album-1/gallery-1/ (Gallery view listing displaying images)You can do this and the way I read it was to alter the plugin’s php however I really wouldn’t recommend this unless you want to have to add the lines back in every time you update the plugin.
How I would recommend doing it is just creating a page template specific to your gallery.
e.g. You have album is called “Portfolio” with the gallery “Pretties” contained within. So on your Portfolio page you put the [album id=portfolio].
Open your wordpress theme’s page.php and resave it as page-portfolio.php.
The php in question will be something like:
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?> <?php endwhile; ?> <?php else : ?> <h2>Not found!</h2> <p>I couldn't find the page you wanted sorry. Please use the menu above to try and find it.</p> <?php endif; ?>
This will just spit out the title “Portfolio” irregardless of the album name or gallery name.
Replace “<h1><?php the_title(); ?></h1>” just below the “<?php if (have_posts…” with this:
<?php $album = nggdb::find_album( get_query_var('album') ); ?> <?php $gallery = nggdb::find_gallery( get_query_var('gallery') ); ?> <h1><?php echo $album->name?><?php echo " - ", $gallery->title?></h1>
The first two lines get the names of the album and gallery. The php between the <h1> tags spits it out so it will look like “Album Name” – “Gallery Name” or in the case of our example Portfolio – Pretties.
Also, you can change the “-” to whatever you want or omit it entirely by removing the ” – “, part (i.e. <?php echo $gallery->title?>)
These are interchangeable and you can put them where ever you want on the page.
Hope this helps! ??
There are several ways you could go about fixing this but the easiest and most cross-browser compatible would probably be to set the css of .slideshow (in nggallery.css) to a fixed width and the containing (parent) element to be a fixed width. Subtract the slideshow width from the container width, divide that by 2 then use that as your left margin. e.g.
div#container {width:500px;} .slideshow {width:300px; margin-left:100px;} /* margin = (500-300)/2 */
However if you have a fluid layout where your container element can’t be fixed width then you will need extra trickery to get that to work.
I would probably recommend at this point just avoiding the plugin full stop seeing as how many people seem to be having issues with it. You can do exactly the same thing as the plugin by adding something like this:
RewriteRule ^category/(.+)$ https://www.yourblog.com/$1 [R=301,L]
to your .htaccess ??Go to the NextGen Gallery ‘Options’. Click on the ‘Gallery’ tab up the top. Beside the option “Integrate slideshow”, untick the box. Hope that helps! ??