Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
KuruMonkey
Jul 23, 2004
Floating the image will usually have the effect you ask for. So fix in CSS.

Edit: check there's no clear: on the paragraph(s) in question.

Adbot
ADBOT LOVES YOU

KuruMonkey
Jul 23, 2004
Indeed; learn the standard everyone is moving to, not the one everyone's moving from.

(its also much better and simultaneously less annoying than xhtml strict)

KuruMonkey
Jul 23, 2004

Alfalfa posted:

So basically I'm totally new to this but slowly trying to teach myself and learn. I have two questions (for now) though regarding my blog in progress.

The blog is https://www.dclaiborne.com

In the header I would like for that image to take up the entire space including behind the search bar. It will also go behind the page tabs and I will edit the header to move the website name to another spot on the header. When I make the header image bigger it just pushes it further down and won't actually go behind the search bar.

Also how do I get the page links up top to stop being yellow? I would like for them to be transparent and just sit on top of that red header if possible.


If you're happy editing the template files, then the issue is as follows...

Your theme's header area is built from 2 divs the same width, the first has the search bar bits in, and the second is the "header" (has id="header") itself.
Your header image (which is an IMG tag, not a background at the moment) is in the header div, so won't cover the search bar. (and stuff won't go "over" it readily)

What you need, really, is a div that the menu div and the header div both live in, that has a background of your chosen image. Then the other elements will sit on top nicely.

The menu items are yellow because the div they are in:
<div id="pagemenucontainer">...</div>
has a yellow background set.

You want to be running firefox for this, even if you don't normally, and you want to be running FireBug; you then have a right click for "inspect element" which will give you a cleaned up hierarchy for the DOM and beside that a listing of all the CSS rules that apply to the element, which CSS file they came from and on what line. (it will also highlight the element on the page and outline the margins and padding for you)

Only registered members can see post attachments!

KuruMonkey fucked around with this message at 15:43 on Feb 18, 2010

KuruMonkey
Jul 23, 2004

atastypie posted:

There are similar inspectors built into Safari and Chrome and you may prefer the way they look over Firebug.

True enough; I'd not used either and you can only recommend what you know. The Safari DOM/CSS inspector doesn't have every feature of Firebug's as far as I can see (particularly line numbers for rules, as even in a single file the rules pertaining to an element can be widely dispersed). And "pleasing to the eye" is exceedingly low on my list of priorities for a debugging tool.

The Safari Javascript debugger, however, does look a huge amount better than FireBug's- I'm going to have to have a play - thanks for the nudge to go look!

KuruMonkey
Jul 23, 2004

Alfalfa posted:

Ok got the underlined portion taken care of easily.

Can you go into a little more detail regarding the top part you are talking about?

edit: Also there is one random yellow strip remaining to the right of those pages that when I click inspect element it doesn't take me to anything regarding that color. When I click view background image the image isn't even yellow. Where can I find that option?

Thats not actually going to be overly simple in your theme, not least as its using some CSS grid framework.

However, in essence what you have is this:

code:
<div id="wrapper">
  <div id="themenusection">
    <!-- menu stuff; many lines -->
  </div>
  <div id="theheadersection">
    <!-- header stuff, many lines, includes the image -->
  </div>
  <!-- rest of your main content area, many, many lines -->
</div>
Note: the ids I gave there are just to identify sections in the example, and are not those in the page; menu section doesn't have an id for instance :(

Both Menu section and header section are full width within the wrapper, and therefore header is lower on the page than menu.

What you want is:

code:
<div id="wrapper">
  <div id="wholeheadsectionwrapper">
    <div id="themenusection">
      <!-- menu stuff; many lines -->
    </div>
    <div id="theheadersection">
      <!-- header stuff, many lines, remove the image completely! -->
    </div>
  </div>
  <!-- rest of your main content area, many, many lines -->
</div>
Then you can set the background image of #wholeheadsectionwrapper to be your header image, and the menu section and header section will sit on it nicely.


Note: as with the firefox thing; I'm being entirely prescriptive and showing how I would do it. These kinds of things are cats; there are many ways to skin them.

Regarding the other question; I'm at home now, and don't actually run FireBug here. There will be a delay, but I should be able to find it in a while. And I'll detail how I found it for you, not just what I found...


Edit: actually there's not much to tell. Refer to the image in my previous post; that same element has a yellow border-right property. I'd make that the background color if I were you. (I've never set border-right: 4px solid transparent; on anything, try it, it might work) I'd generally be inclined not to remove the border just in case they (the theme writer) really relied on the extra 4px width that border gives.

KuruMonkey fucked around with this message at 18:43 on Feb 18, 2010

KuruMonkey
Jul 23, 2004

Alfalfa posted:

I am trying to add a box on the right column that says "FOLLOW ME ON FACEBOOK!" or something along those lines. I want it to look identical to the RSS and Twitter ones above it.

Assuming you know the code snippet you need to put IN the box, all you need to do is either:

below (or above, depending the order of boxes you want) the twitter box code you posted, just add:

code:
<div class="rssbox">
  <!-- your code snippet, greeting text etc, whatever your payload is -->
</div>
Because you're not making a new theme to distribute, just tweaking the theme for your site, that should be OK. ASSUMING the theme isn't doing any funky javascript that hooks onto the "rssbox" class. If it is, your new box will also be afected.

The alternate is to substitute "facebookbox" for "rssbox" above, and then go to the theme CSS and find every rule that references ".rssbox" and add ".facebookbox" to the selector.

Examples:
code:
.rssbox { ... }
.sidebar .rssbox { ... }
Becomes:
code:
.rssbox, .facebookbox { ... }
.sidebar .rssbox, .sidebar .facebookbox { ... }
Edit: I'm not saying those ARE the rules you need to find, but the comma bit and duplicate with a switched class is the principle you need to follow.

This is obviously a lot more work.

AND either way you now have to be wary of any update to the theme, as it will break your tweaks (all of them, not just the facebookbox)

You might want to read up on Child Themes which mitigate against this a little. (or a lot depending on the theme you use, but in the case of that one, probably a little)

KuruMonkey fucked around with this message at 18:57 on Feb 18, 2010

KuruMonkey
Jul 23, 2004
Dunno about any particular theme specifically, but in general thats going to be a case of picking through the relevant PHP file (maybe sidebar.php if its structured 'normally') and finding the chunk of code that makes the find me elsewhere block and cut/pasting it before the video section.

KuruMonkey
Jul 23, 2004
Whats the name of the theme? I can install it on my test install and take a look.

KuruMonkey
Jul 23, 2004
OK

That theme has just the one widget area, which currently comes after the social links, twitter box, video etc.

Your option is basically to move the widget area as a whole, by cut/pasting it around the sidebar.php file. (or in fact to cut/paste the other items around the widget area; see below)

The widget area code is this:

php:
<?
<ul>
            <?php 
                    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>

                
                <li><h2><?php _e('Recent Posts'); ?></h2>
                           <ul>
                    <?php wp_get_archives('type=postbypost&limit=5'); ?>  
                           </ul>
                </li>
                
                <li><h2>Archives</h2>
                    <ul>
                    <?php wp_get_archives('type=monthly'); ?>
                    </ul>
                </li>
                
                <li> 
                    <h2>Calendar</h2>
                    <?php get_calendar(); ?> 
                </li>
                
                <?php wp_list_categories('hide_empty=0&show_count=0&depth=1&title_li=<h2>Categories</h2>'); ?>
                
                <li id="tag_cloud"><h2>Tags</h2>
                    <?php wp_tag_cloud('largest=16&format=flat&number=20'); ?>
                </li>
                
                <?php wp_list_bookmarks(); ?>
                
                <?php include (TEMPLATEPATH '/recent-comments.php'); ?>
                <?php if (function_exists('get_recent_comments')) { get_recent_comments(); } ?>
                
                
                <li><h2>Meta</h2>
                    <ul>
                        <?php wp_register(); ?>
                        <li><?php wp_loginout(); ?></li>
                        <li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
                        <li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
                        <?php wp_meta(); ?>
                    </ul>
                    </li>
                    
            <?php endif; ?>
        </ul>
        <?php if(get_theme_option('ad_sidebar1_bottom') != '') {
        ?>
        <div class="sidebaradbox">
            <?php echo get_theme_option('ad_sidebar1_bottom'); ?>
        </div>
        <?php
        }
        ?>
?>
Yup; its about 3/5 of the sidebar.php file. Sucky. (but true of most themes, as they go for default widgets if you haven't picked any)

To just shove the video below the widgets, find this code for the video:

php:
        <?php if(get_theme_option('video') != '') {
            ?>
            <div class="sidebarvideo">
                <ul> <li><h2 style="margin-bottom: 10px;">Featured Video</h2>
                <object width="290" height="220"><param name="movie" value="http://www.youtube.com/v/<?php echo get_theme_option('video'); ?>&hl=en&fs=1&rel=0&border=1"></param>
                    <param name="allowFullScreen" value="true"></param>
                    <param name="allowscriptaccess" value="always"></param>
                    <embed src="http://www.youtube.com/v/<?php echo get_theme_option('video'); ?>&hl=en&fs=1&rel=0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="290" height="220"></embed>
                </object>
                </li>
                </ul>
            </div>
        <?php
        }
        ?>

And the go right to the end of sidebar.php

you'll see to </div> tags on 2 lines as the end of that file; poaste just before those </div>s to make the video bottom item.

KuruMonkey
Jul 23, 2004
OK, I seem to have hit a brick wall (metaphorically)

I need to alter (in my theme) how images in posts and pages are displayed.Specifically, to add to the HTML that is rendered for the images; wrapping DIVs to be precise.

Foolishly I thought "hey, wordpress is pretty well written; there'll be a filter for that, somewhere..."

Dilligent searching turns up two filters: get_image_tag_class and get_image_tag
Now; get_image_tag will let me wrap the IMG tag in a div.. HOWEVER - its called once, at the point the image is inserted into the post/page, not on page display.

This means that my additional div will be permanently added to all images added to the site while my theme happens to be active, and not added to pre-existing images on the site, and will pollute the markup of the site for all following themes. That sucks, and is no good at all.

Does anyone know where to look for a filter that covers the markup of images at page render time? Is there such a filter? Do I really have to do this in javascript? (a very lame solution indeed) Do I have to filter "the_content" and then parse for image tags?!?

Or more likely, am I missing something (obvious)?

KuruMonkey
Jul 23, 2004

Ned posted:

Probably this. Alternatively, you could shove the_content into simplehtmldom in order to not write a regular expression and then just find the img tags and wrap them there. But you'd have to include simplehtmldom with your theme.

Thanks; I swallowed my pride and did it in jQuery - you have to account for some images having the wp-caption div wrapped around them already - so I decided it was better to do it in jQuery and either wrap my div or just add a class to the one already there depending.

On the plus side; I'm considerably better at rewriting the page with jQuery than when I began :)

KuruMonkey
Jul 23, 2004

Gasmask posted:

Quite frankly, the implications of this hurt my head to think about, but I'm interested as to whether it's even technically possible.

Thanks for your time.

I've done something somewhat similar, but you'll have to judge how similar/feasible this is for your needs:

Basically I had a front page (with animation!!!) which then provided links to 4 separate "sections" of the site - but once in the section, most of the content (portfolio) was the same - but the pages were styled to suit the section you were "in".

What I did was, in my theme, the front page is a page with no content (empty page content box) set to a custom page template (that does the actual content for that page only) - I needed the front page accessible in the menu.

I then added (in functions.php in my theme) a simple session setup, that tracked which "section" link you'd clicked, and made that available for the rest of the site.

Then I hooked into the writing of the body tag on every page, and added a CSS class based on the "section" value in the session.

I can then basically target CSS based on how you got to a specific page.

You would want to capture the referrer? to do similar but based on how the punter got to a particular page. You might need to do this on every page, not once and store in a session?

I've bleated on about Thematic before, but this is the kind of reason I use that theme; its got hooks out the wazoo for this kind of thing - so I'm not making any claims that this technique will or won't work with other themes.

For reference, this is the set of extras I put in functions.php in my child theme for this. (reviewing it; I set the "section" whenever you load the "section front page" not on the actual front page; the main front page linked to those 4 pages, they link to overlapping content)

php:
<?
/* enable sessions */
function thematic_enable_sessions()
{
    session_start();
}
add_action('init', 'thematic_enable_sessions', 1); // very very high priority!

/* update with custom session data */
function thematic_update_session()
{
    if(is_page('design'))
    {
        $_SESSION['section'] = 'design';
    }
    elseif(is_page('web'))
    {
        $_SESSION['section'] = 'web';
    }
    elseif(is_page('productions'))
    {
        $_SESSION['section'] = 'productions';
    }
    elseif(is_page('photography'))
    {
        $_SESSION['section'] = 'photography';
    }
}
add_action('wp_head', 'thematic_update_session');

/* custom body class, based on custom session tracking */
function thematic_custom_body_class($c)
{
    if(isset($_SESSION['section']))
    {
        $c[] = 'COMPANY-NAME-REDACTED-section-'.$_SESSION['section'];
    }
    return $c;
}
add_filter('body_class', 'thematic_custom_body_class');
?>
edit: oops!

KuruMonkey
Jul 23, 2004

RyanNotBrian posted:

Is there a standard set of plugins you guys would recommend to begin using WP as a general CMS?

I could not live without:

Contact Form 7
NextGen Gallery
wpPrettyPhoto
Shopp (ecommerce)
Thematic (theme framework/toolkit)
Kimili Flash Embed
Page Menu Editor (separates page name from menu entry text)

Not all of those are "CMS" things, but thats a selection of plugins for various purposes that (so far) don't seem to tread on anything else's toes (wpPrettyPhoto specifically is the slimbox style thing I found least intrusive/likely to cockup other things)

I failed HARD in a quest to find a really useful GoogleMaps plugin, however. So I built / am building my own.

KuruMonkey
Jul 23, 2004

gwar3k1 posted:

A quick google tells me I can't have specific widgets on specific pages, its all or nothing. So how can I customize my wordpress-powered site in this way?

You want Widget Logic

Basically adds a field to every widget in which you write rules controlling if it displays or not.

KuruMonkey
Jul 23, 2004

NotShadowStar posted:

I never did figure this one out. Is there a more elegant way of linking to an image included in the theme rather than

php:
<?
<img src="/wp-content/themes/clownfarts/images/clownbutt.png" alt="effu" />
?>

You want to be replacing that with:

php:
<?
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/clownbutt.png" alt="effu" />
?>
Which will take the url of the dir that the main stylesheet is from. (which is, basically, your theme's directory, but will be correct if you are using a child theme as well as if not, bloginfo('template_directory') or bloginfo('template_url') both fuckup if you're building a child theme; they return the path of the parent)

bloginfo (and even more; get_bloginfo) is your friend; hit up the codex.

KuruMonkey
Jul 23, 2004

Ned posted:

Use Twenty Ten and pages instead of posts. It should work out just fine.

Yep; install WP, then:

under Settings: Discussion: Default article settings -> disable "Allow comments on new articles"

create a page called "Homepage" or some such (make "About" not your only page, basically)

under Settings: Reading: Front page displays -> choose a static page, choose the "homepage" you made earlier.

Now add the content you want in pages, not posts.

You now have a very simple "static website" framework, that gives you all of the benefits of WP, but doesn't behave like a blog at all.

(aside; I habitually use the plugin "page menu editor" to dislocate the on-page main heading from the menu item label when doing this with a site)

Any template that cocks up when you do that is a bad template.

Note that there are plugins such as "list category posts" that will allow you to embed categories of posts as dynamic content in pages, meaning you can have areas of a "page driven" site that are in fact post driven (so "news", "events" type sections etc) - without having to resort to custom page templates with rewritten loops or anything (which tends to result in a site the client cannot understand how to update)

KuruMonkey
Jul 23, 2004

revmoo posted:

I have some plugins that I've heavily modded, how do I tag a plugin to remove update notices?

Change its name (in its main php file)

I found that one of my plugins (not published) has started sharing a name with another (published) plugin; I get update notices for the published version.

KuruMonkey
Jul 23, 2004

thegasman2000 posted:

I genuinely have no idea how hard it would be to convert one to the other.

Insignificantly different from starting from scratch.

Edit: by which I mean that when writing Joomla addons, and Wordpress plugins, you aren't so much writing with PHP, as you are writing with Joomla/Wordpress, and just happen to be using PHP syntax. Thats not precisely the case, but if the difference/disjoint between joomla programming and wordpress programming is lost on you, then me saying "same as taking a windows program and porting it to X11 - hey they're both in C right" would be utterly lost on you, I guess.

KuruMonkey fucked around with this message at 15:26 on Feb 10, 2011

KuruMonkey
Jul 23, 2004

thegasman2000 posted:

hmm thanks. Any idea of how long it would take a decent php programmer to build? Just looking at what it would cost to get someone to do it.

Honestly? Cheaper to pay someone else to build you the site you wanted in Joomla so that you can use the plugin you need.

KuruMonkey
Jul 23, 2004

thegasman2000 posted:

its so different to Wordpress and seemingly illogical.

Joomla is harder work than Wordpress for sure. The reason we went over to WP at work was that clients would come in for me to show them around the admin area for their new site...and just give up after seeing the Joomla system.

With WP our clients actually DO update their sites by themselves :)

KuruMonkey
Jul 23, 2004

Twiin posted:

"Some people, when confronted with a problem, think 'I know, I'll use regular expressions.' Now they have two problems."

The main cause of this phenomenon, of course, is stubbornly attempting to apply regular expressions to irregular data...

KuruMonkey
Jul 23, 2004

Omits-Bagels posted:

Yeah, I didn't want to get into all the SEO stuff in this thread (as this isn't the right thread). I just wanted to see if I would have technical problems switching from AIO to Yoast. I didn't phrase my question very well.

I think on that front; Yoast's plugin has options to import settings from some other SEO plugins, including AIO. So I guess your process is; deactivate AIO, don't uninstall yet, install Yoast, import, uninstall AIO.

I've not followed that process myself though.

KuruMonkey
Jul 23, 2004

Baish posted:

Is it at all possible to tag pages so that every tag I make goes to it's own page as opposed to category? I've found a few plugins but they're mostly outdated.

I can't really pull what you actually want out of that question


Do you want to add Tags to your Pages? (as in not Posts)

If so I don't know, but I'd be interested in the possibility too.



Are you wanting archive Pages, but listing Posts for a Tag not for a Category?

In which case http://www.example.com?tag=YOUR_TAG_SLUG will do it.
With my permalink setup http://www.example.com/tag/YOUR_TAG_SLUG works too.
there are tag list plugins out there (but most are "clouds"...)
I did once find a widget that made a simple text menu of all tags on the site, but I can't remember it now.

KuruMonkey
Jul 23, 2004

revmoo posted:

This is kind of odd. This code:
code:
if (is_page('0') == true) {
echo 'Poop';
}
Shows up on TWO separate pages on this site. Why in the world are there two page 0s in this wordpress install? How the heck does this work?

when you dig into it, is_page() simply calls $wp_query->is_page(). Which has this little bon-mot in it;

php:
<?
if ( empty( $page ) )
            return true;
?>
Checking empty(); '0' is on the list of 'empty values'

Edit; to be fair though; you were, logically, asking it to check for a title or slug of '0' - not the page with id=0, which I suspect is what you mean? IDs are integers; send an integer.

KuruMonkey fucked around with this message at 21:20 on Mar 29, 2011

KuruMonkey
Jul 23, 2004

strangemusic posted:

I'm a CSS idiot, and I'm wondering how to adjust the background colour for the content and sidebar frames (not the "outside of content" background, that's easy) in the Pilcrow theme. I'm self-hosted.

Any advice?

Use firefox, use Firebug. Inspect element. That will let you locate the tag that has the BG you want to change, and also tell you the line in which css file its defined in. Then you go edit.

KuruMonkey
Jul 23, 2004

cocteau posted:

For a couple of sites I did last year I was really happy with the Google Ajax Translation plugin, but haven't used it since WordPress 3.0 was released, and it's not showing that it's definitely compatible. That doesn't mean a lot, though, and it might well work, so it's worth a shot anyway (can't lose anything by trying).

I found that the plugins for google translate really didn't work very well at all with 3.0 onward.

On the other hand, if your theme is anything other than staright up useless, it should be really easy to add to the theme manually.

It IS auto-translate still though, so unfortunately not what the questioner was after.

KuruMonkey
Jul 23, 2004

Boosh! posted:

Is that Shopp add-on still the best thing to use?

Best? Dunno. It is, however, what I use when we get 'small' ecommerce requests from clients at work, it does the job of allowing someone who could update with base wordpress to be able to have an ecommerce section and also be able to update that with minimal effort / extra learning.

If your client is ever going to legitimately come to you with an excel file of their 200 products asking how to do this mass update... Shopp is not for them.

Its not the most flexible with regards styling; my advice would be that, whatever theme you are using you want to make a child-theme of it to work in, because Shopp will want to add a new folder to your theme for its CSS, which you then need to edit.

Its an OK system, but you DO want to be in a child theme for doing that kind of thing - probably better to know that up front.

Oh and the docs for shopp aren't awesome; they're there, and I think they're complete, but they're just not well written or structured - you have to dig a bit.

KuruMonkey
Jul 23, 2004

thegasman2000 posted:

I have been using wp e-commerce... The beta 3.81 RC4 (I think) is awesome and now fully supports variations with different SKU's. Well worth looking at.

I did evaluate it before going for Shopp - I forget the precise details, but there was something that Shopp did out of the box that WP e-Commerce wanted the premium upgrade for (edit: that we required). Also Shopp has an unlimited developer licence and WP e-Commerce's developer licence is for 3 sites. So long term Shopp is cheaper, as long as long term means you'll develop > 3 such sites (we have).

KuruMonkey
Jul 23, 2004

Non Serviam posted:

Are there any plugins that do this?

As noted above; WP does this out of the box. However, NextGEN Gallery does it massively better, and there are slider, carousel and slideshow plugins for it too.

KuruMonkey
Jul 23, 2004

Non Serviam posted:

Thanks for that! SO far, even though I'm very ignorant when it comes to wordpress, it works fine in both IE and Firefox; for some reason the gallery won't work in chrome.
Have you also had that problem?

Nope. I do tend to turn off the NextGEN thumbnail effect in the options, and use whatever I'm unsing on the main site. Also I don't use the NextGEN built in slideshow feature - if its either of those messing up, could be anything.

But the gallery I've just put together on a site in it seems fine in Chrome.

KuruMonkey
Jul 23, 2004

Bojanglesworth posted:

Argh. This is too confusing for me. I am scared I am going to gently caress something up. I will have to get someone else to do this I guess.

We use 1and1, setting up WP is pretty trivial (you've already done the complex bit by setting up a DB).

What you do now is; go to the wordpress website, download the current version, in a zip.

Unzip on your computer.

FTP into your 1and1 account, go to your blog folder, copy up the content of that zip.

open your web browser, go to https://www.example.com/blog

WP will ask if it should create a config file - say yes

WP will ask for the DB connection details you should have kept a note of when you setup the DB - give it them.

WP will ask you for an admin password - pick one.

WP will log you into your new WP install - you done!

It /that/ is too complex - runnning a self-hosted WP install is not for you, go back to wp.com

KuruMonkey
Jul 23, 2004

I R SMART LIKE ROCK posted:

Ok I'm at a brick wall. What the client wants is to have users fill out a survey, have that filled out info go into a PDF and have that PDF emailed to them.

Now I'm using http://wordpress.org/extend/plugins/wp-surveys/ for the survey part, because they want to be able to modify the questions down the road and such.

For emailing I'm using http://www.texelate.co.uk/blog/send-email-attachment-with-php/

I've setup the an ajax function for the on submit of the survey to encapsulate the data. But I don't see any wp plugins for pdf generation. I was directed to http://www.tcpdf.org/ but I needs me to use require() to be able to use it. Doing that in functions.php causes errors.

Any advice?

Write a plugin, make yourself a wrapper around the PDF functionality. You can basically write yourself a plugin that just adds a library into WP (making sure not to create namespace clashes).

Basically a WP plugin is nothing much more than a PHP file with a header comment that identifies it to WP.

On the other hand; you can use require() in functions.php - what is the error you're getting? (probably pathing error or a namespace clash, at a guess)

KuruMonkey
Jul 23, 2004

cocteau posted:

I agree with Ned. Still, even saying that, WordPress really isn't that hard. I can teach someone who is computer-literate (knows how to use MS Word), but has never used WP before, how to enter content, manage themes and plugins, and a few other tasks (usually specific to their theme) all within an hour. Now if we're talking grandma who needs the "internet" button on her desktop to even open a web browser and can't manage her email without assistance, WP will probably be too difficult... but are those people really wanting their own websites anyway?

This is the truth; I always tell our clients that if they can write and send an email, they can update WordPress.

The converse is also true; if you really cannot use a computer at all competently, your dreams of running a website need a reality check.

KuruMonkey
Jul 23, 2004

Gyshall posted:

One question that hopefully someone can help me understand - what the gently caress are Taxonomys? How do they relate in terms of Wordpress and what would I use them for?

Thinking in terms of the normal Post post type; Tags and Categories are Taxonomies.

Custom Taxonomies allow you to invent new ways of tagging or categorizing your Posts. You can apply them to some or all of the post types on your site. Currently you can basically only make new duplicates of the Catgory kind of taxonomy (by setting hierarchical = true), or the tag type (by setting hierarchical = false)

Real World Example;

I'm building a client a site that lists local Bands, Venues and Gigs - I have 3 custom post types for these. I also have taxonomies set up; artist type and venue type - for the relevant post types, these are like the categories. The Gigs have 2 new taxonomies; Performers and Location - which are the of the tag type of taxonomy (you tag the gig with the post slug of the relevant artists and venue)

On the front end this means I can pull out all the Gigs for a given Venue, or I can pull out all the Venues that are Pubs rather than Open Air etc.

The main advantage, however, is in the admin area, when the client has to start editng content; the 3 custom post types appear in the left hand menu, and because of the way I've set up the taxonomies on the site the custom post types ONLY get their custom taxonomies available (so no 'tags' for Gigs etc) - makes the editing of the various types a lot more obvious when I don't have to give instructions that say:

'make sure to put your gigs in the gig category, and then remember that your tags on gigs are for performers, but for venues use the venue category, and now tags are venue types; use only ONE here. But for artists use the artist category, and then put genres of music in the tags. Oh; and never use a tag listing widget on this site, because you'll get a whole mess of performers, venue types and genres mixed together!'


Basically, at the moment, custom taxonomies are a cool tool for programmers who make customized WP installs, plugins and themes to make the client's interface more easy to understand. At the cost of them being actually quite complex to configure, and to write custom loops for.

KuruMonkey
Jul 23, 2004

Peer-to-Peer Nachos posted:

Outside of a framework these are pretty straight forward, but I'm not sure what the best route is to put them into WP.

Any suggestions? Or hell, search terms? My Google-fu is failing me.

If you have bits that are PHP and outside the WP stuff, but that feature throughout the site, you want to be writing custom plugins; shortcodes and widgets probably. They'll provide you the YourCode<->WP interface, and give you chunks of extra features to use wherever.

Read: plugin api, shortcode api and widget api Note that the Shortcode and Widget APIs are actually pretty verbose and clunky for what they do


If you have entire pages that want to be outside the WP system for most of their content, but want to still use the theme and widgets etc from the main site; you want to be using a custom theme of your own, or a child theme of whatever theme you're using. That will let you setup custom page templates in which you can then mix loop-based code, widget areas and your own stuff freely.

Read: child themes, page templates and template hierarchy - that image/map will help immensely when doing any non-trivial theme work.

If you have a whole section of your site thats entirely custom, and don't need the WP content system for those pages at all - make yourself a new folder beside the WP install, and run that stuff from there and just link out from WP. To make it look the same as the main WP site; once you're done, scrape the rendered html from a finished page and replace the content with your custom stuff (or transfer the rendered html into a template for the other templating system)
A sub domain (stuff.whatever.com) can be a nice way to organise (logically, so you don't get confused as to what drives what) a parallel system.

If your existing stuff is written and good (with the possible exception of the ecommerce bit if you like) I would treat it as you would if it was an external service like twitter; build a client for it to fit it into WP, but leave it untouched as much as possible.

KuruMonkey
Jul 23, 2004

Kabz posted:

Someone here can set me straight:

So;
you can log into your admin area for WordPress OK? Should be http://www.example.com/wp-admin unless you changed anything during install

If so; you want to go to "Appearance" in the Left Menu, clicking it gives you a sub-menu - you then want "Themes"

If your theme is installed correctly; it should be shown in a list with an "Activate" link - thats how you make it the active theme.

If something goes wrong with following that, you probably need to come back and tell us how/why it went wrong (like if the theme isn't in the list etc)

If thats the case, you'll need to cover some basics:
is the default wordpress site up at your domain?
can you log into the admin area OK?
etc.

You may want this: WordPress for Dummies
Or this: Head First WordPress

By which I don't mean to be an rear end; you sound like you want a step by step getting started guide, so go get one.

Edit:

OK; bit more detail :)
I'm afraid this is a bit at the "turn it off and on again" level, but: you did upload a folder of files for the theme, not a zip file?
If you've uploaded a folder of files for the theme, and its not showing in that Appearance/Themes list, then there's an issue with the theme itself; in which case - which theme?

KuruMonkey fucked around with this message at 12:00 on Nov 28, 2011

KuruMonkey
Jul 23, 2004
I would suggest;

get yourself an FTP connection to your hosting so that you can work with the files directly rather than through CPanel. Try FileZilla. You should be able to get the connection details from you hosting control panel.

Unzip the theme zip file locally; check it unzips OK. The key file will be called style.css in the main theme folder. That file must have a comment /* comment style */ at the start, which will be stating the theme name - that's the bit WP looks for to identify the theme.

Honestly I'd then connect via FTP, delete whatever is in the wp-content/themes folder related to your intended theme, and then upload the extracted folder by hand through FTP

If I had to make a guess, I'd say the unzip process through CPanel had either mangled the files it was extracting, or possibly left the files either owned by the wrong user account on the server, or at least un-readable by the account PHP runs under on the server. Either way; doing it by hand and through FTP should side-step that for you.

KuruMonkey
Jul 23, 2004
Page with a custom template, 2 extra widget areas on that page.

Widget that shows a specific page.

Whole bunch of other pages (one per block) which have another custom template.

1 Widget instance per block, set to show the relevant page.

Basically the same as Ned's plan, but with drag+drop re-ordering of the blocks in those columns. (and probably a bigger bill attached, because that's quite a lot of extra work)

KuruMonkey
Jul 23, 2004

MrHyde posted:

The question is: is there a way to override the CSS in the parent theme without having to specifically nullify anything they could possibly add in the future? I don't want to have to say "and I don't want a border, and I don't want padding and I don't want marigns and I don't want ...etc etc" just to be sure they won't add things that mess up my style in the future.

Nope. If you want to make a (logical, in your head) positive assertion that in your design this element has no border, then the only way to express that is an explicit decaration in your CSS that this element { border: 0; }. That's true for every styling option.

3 notes:

1: cocteau is completely correct that your best bet in this case is to simply not update the parent theme. However, I appreciate that this is not always an acceptable option. You do have to make the decision, every time you update the parent theme "I'm updating the theme, this may involve me updating my child theme too". I'd suggest that you want to move to maintaining a local (wampserver or similar) duplicate of your site, at least in terms of theme + plugins, not particularly content, so that you can update that first, test + update the child theme privately, and then roll out your overall update in one go. (especially if its a client's site - looks so much more professional)

2: be aware that cocteau is absolutely wrong in stating that themes are less important to keep up to date than core + plugins. Themes include this little file called functions.php, which is in essence a plugin packaged inside the theme, and can do anything a plugin can, including inlining other plugins and gubbins inside the theme (so, think timthumb can be bundled inside a theme's distribution, and we all know timthumb was a vector of WP site hacking, right?)

Quite apart from that specific element, all templates in WordPress are simply PHP files, and they all run at the same level of privilege (absolute control over your installation). So each template can do anything possible in PHP.

So not updating themes is just as serious a choice as not updating plugins. Not quite as serious as not updating core, but only by a slight margin.

3: the kawaiiest is pretty much bang on with the CSS, and the !important is worth noting. Given that your previous change had worked, its probably unnecessary in this case, but over-riding parent theme CSS is a classic and awesome / totally reasonable use for !important.

Put simply it can let you find an accessor that targets what you want, and not worry about the specificity of the rules in the parent that target it. It also means if you're injecting your CSS elsewhere and not sure which CSS file will be processed first, you can use it to pre-emptively over-ride rules that 'follow'. Tl;DR - !important is pretty much built for this kind of 'over-ride someone else's existing rules' work.

drat. That was a very long way to say 'no', 'agree', 'not really' and 'pretty much'. Ho Hum.

Adbot
ADBOT LOVES YOU

KuruMonkey
Jul 23, 2004

outlier posted:

So it seems there's a number of ways to go about this: categories, nested pages, etc. What possible solution should I look at, what's best, what doesn't work?

Based on what you mentioned so far, I'd be inclined to go nested pages, with a caveat.

First though; note that you "can" use new URLs without breaking the old URLs. (in this case note "can" means "it is possible to" NOT "i recommend that you do") Look into .htaccess, and specifically 301 redirects for moving resources. That would give you the option of building any new structure you want, at the cost of setting up a bunch of redirect rules.

Can you give a link to the live site so we can get an idea of how much is there and how its actually structured on site?

You give the example:

http://mysite.net/science/bioinformatics/galaxy/using-toolsheds

do these pages exist and have actual content? (as in are not simply listings of pages lower in the tree):

http://mysite.net/science/bioinformatics/galaxy/using-toolsheds
http://mysite.net/science/bioinformatics/galaxy
http://mysite.net/science/bioinformatics
http://mysite.net/science

If, say, ~/bioinformatics/ has an introduction article, and isn't just a listing of other pages, then I'd definitely go the nested pages route.

The flip side is if they ARE just lists of links to the other pages, then using posts/categories gets you those listing pages 'for free', whereas with pages you have to build them manually (and update them when you add a new page). Note that you CAN have more on the category page than just a bare list, but it takes some extra work, whereas the Pages variant just means work in the editor.

Personally; I'd hedge towards using Posts if possible; leaves you all the options for recent posts lists on the front page etc. (which again; you CAN do with pages, but its easier with Posts)

Like a broken record, I'm going to recommend you install a local WP instance (wampserver or similar) and play with the structure options in private, with 2 or 3 posts / pages, simulate 'what do I do when I add content' etc. That will more accurately answer the question for you personally.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply