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
Ether Frenzy
Dec 22, 2006




Nap Ghost
Doh. Definitely was overthinking it, and trying to do it via the wordpress dashboard. Thanks.

Adbot
ADBOT LOVES YOU

pipebomb
May 12, 2001

Dear God, what is it like in your funny little brains?
It must be so boring.
Hi all. Back in 2005 I started a site, using Wordpress, and kept it going for a few years. Then when my real job got in the way I let it languish.

Now I've got some free time and I decided to revive it. I was wondering if you could take a look around and see what you think.

It's based on InReview by Elegant Themes. There are a few things I've yet to do, including:
* Revamp comments
* Insert galleries below each post
* Make it easier to handle reviews
* General css tweaks for browser compatibility though IE is not a concern
* social and customized login page
* a bit of mobile tweaking


Anyway, if you get a second:
http://babygotmac.com/wp-login.php

goon/stairs (subscriber account)

Feel free to make comments, rate, etc.

If you see anything security wise, PLEASE let me know. Hopefully all is fairly current.

Also, if you see anything you like, ask - happy to share my customizations.

PS: No real content at the moment, just copy/paste stuff mostly.

PSS: I'm considering pulling comments - just allowing ratings from authenticated users. Any opinions on that? It would cut down on BS, plus I could style it to look like the sidebar (avatar | name | rating)...

pipebomb fucked around with this message at 22:54 on Jul 8, 2013

kedo
Nov 27, 2007

Ether Frenzy posted:

Doh. Definitely was overthinking it, and trying to do it via the wordpress dashboard. Thanks.

Yeah, never do anything besides activating/deactivating things via the WordPress dashboard. You're just introducing more moving parts and weird PHP functions on top of what could be a very simple task.

Same thing goes for plugins, WordPress updates, etc. Those functions are in the dashboard for people who are like, "FTP? Whaaa :psyduck: like the people who send flowers?"

Shadowstar
May 19, 2003

~~~~~~~~~
Huh? What are the downsides to upgrading core and plugins via the dashboard? Seems a lot quicker and more convenient than FTP, and I'm a developer.

kedo
Nov 27, 2007

Shadowstar posted:

Huh? What are the downsides to upgrading core and plugins via the dashboard? Seems a lot quicker and more convenient than FTP, and I'm a developer.

I've just seen it fail enough that I don't rely on it anymore. Could be due to weird client servers or angry internet gods or whatever, but I just find FTP to generally be more reliable. It is not as quick or convenient, granted.

\/\/ Hmm, good points. Maybe the updater is better these days? The last time I used it must have been years ago... Mayhaps it's time to try it out again.

kedo fucked around with this message at 14:57 on Jul 9, 2013

Ned
May 23, 2002

by Hand Knit

Shadowstar posted:

Huh? What are the downsides to upgrading core and plugins via the dashboard? Seems a lot quicker and more convenient than FTP, and I'm a developer.

I also prefer to use the updater.

It just downloads the zip file and then copies over existing files. It is good stuff.

Problem with FTP is if one file fails you are kind of screwed if you don't know what file failed. That and it doesn't automatically put it in maintenance mode for you.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
Okay, I'm tired, I've been staring at this for too long, and I'm giving up and asking for help. I'm writing an admin plugin that utilizes custom taxonomy. I have the column set up to be sortable:



Click on the "Advertiser" heading, though, and get this:



Where the hell did Test Ad #2 go? :psyduck: Furthermore, clicking on the Advertiser heading again doesn't sort ASC or DESC, although the little arrow does change.

code:
add_filter( 'manage_edit-ads_sortable_columns', 'make_annonce_columns_sortable' );

function make_annonce_columns_sortable( $columns )
{
    $columns['advertiser'] = 'advertiser';

    return $columns;
}

add_action( 'pre_get_posts', 'advertiser_column_orderby' );

function advertiser_column_orderby( $query )
{
	if ( ! is_admin() )
		return;

	$orderby = $query->get( 'orderby' );

	if( $orderby == 'advertiser' )
	{
		$query->set('meta_key', 'advertiser');
		$query->set('orderby', 'meta_value');
	}
}

Ned
May 23, 2002

by Hand Knit
Does none exist as a meta value? If not that query won't return it.

Not really sure about the sorting. Read this I guess - http://wordpress.org/support/topic/admin-column-sorting

Sad Panda
Sep 22, 2004

I'm a Sad Panda.
With Google deciding to kill Google Latitude, I'm looking for an alternative. I use it on my travel blog to show where I last logged in from. I could just have a bit of text that I update myself, but then it wouldn't show the map like my Latitude widget does.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.

Ned posted:

Does none exist as a meta value? If not that query won't return it.

Not really sure about the sorting. Read this I guess - http://wordpress.org/support/topic/admin-column-sorting

I actually used that link as a reference, but thank you for mentioning checking for the "none" meta value. Apparently if you try to sort on a meta key, for any entries that don't HAVE that meta key, they won't show up in sort results. Therefore, I created a "None" advertiser and set that as default in the metabox programming, and it works (and sorts). Thanks a million again!

Drunken Warlord
Jul 8, 2013

It's a dogs life.
Can anybody name any good content-focused blog-type themes for Wordpress?

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



Is there a way to add a dropdown in the editor for users to add my custom CSS for certain things? I have a couple classes that go with things and instead of having them add classes to divs in the background I was asked if I could get it in a menu. I thought I found some stuff earlier but it's nowhere to be found now.

EDIT: This sorta does what I need to do: http://alisothegeek.com/2011/05/tinymce-styles-dropdown-wordpress-visual-editor/

Seems I can just add my classes to that array and it'll apply to the element.

Vintersorg fucked around with this message at 20:18 on Jul 15, 2013

b0red
Apr 3, 2013

CProletarian posted:

Can anybody name any good content-focused blog-type themes for Wordpress?

Depends on what type of content you are going for. I find manifest to be elegant for a text based site.

kedo
Nov 27, 2007

Vintersorg posted:

Is there a way to add a dropdown in the editor for users to add my custom CSS for certain things? I have a couple classes that go with things and instead of having them add classes to divs in the background I was asked if I could get it in a menu. I thought I found some stuff earlier but it's nowhere to be found now.

EDIT: This sorta does what I need to do: http://alisothegeek.com/2011/05/tinymce-styles-dropdown-wordpress-visual-editor/

Seems I can just add my classes to that array and it'll apply to the element.

Yes, but that article is making it way more complex than it needs to be.

Basically just:

1) Install TinyMCE
2) Make a file called editor-styles.css in your theme directory and put your styles (classes) in it
3) Put the styles drop down in the TinyMCE toolbar

And that's it.


e: Protip – use only lowercase letters and nothing else for class names, as it seems to have problems with any other characters.

fuf
Sep 12, 2004

haha
Is there a tried and tested way of using a responsive theme to turn a 2-column layout into a 1-column mobile layout? i.e. if the user's resolution is below a certain width it puts the sidebar contents in a row on the top of the page instead of along the side.

I am using http://www.rootstheme.com/ which so far I really like.

Alternatively, how else would you go about making a blog with a sidebar display nicely on narrow mobile screens? Maybe make the sidebar collapsible or something?

kedo
Nov 27, 2007

fuf posted:

Is there a tried and tested way of using a responsive theme to turn a 2-column layout into a 1-column mobile layout? i.e. if the user's resolution is below a certain width it puts the sidebar contents in a row on the top of the page instead of along the side.

This is very easy to accomplish with media queries, which requires you have a basic understanding of CSS and the ability/know-how to edit the theme. Here's a simple example:

XML code:
<style type="text/css">
#left, #right {
  width: 50%;
  float: left;
}
@media screen and (max-width: 700px) {
  #left, #right {
    width: 100%;
    float: none;
  }
}
</style>

<div id="left">
  Blah blah blah
</div>

<div id="right">
  Blah blah blah
</div>
700px is an arbitrary breakpoint of course.


fuf posted:

Alternatively, how else would you go about making a blog with a sidebar display nicely on narrow mobile screens? Maybe make the sidebar collapsible or something?

That's really vague, there are a million solutions. Check out some of these sites and pick a treatment you like.



fakeedit: Gah, how do I get HTML syntax highlighting :'(

kedo fucked around with this message at 16:54 on Jul 16, 2013

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

kedo posted:



fakeedit: Gah, how do I get HTML syntax highlighting :'(

use: code=html See my edit for what to actually use...

However, I don't think it does syntax highlighting for HTML anyway.

EDIT
Here's the changelog from the forums that talks about the supported languages and so on:

code:
* [code] tag now does syntax highlighting.  It is triggered by using
  [code=syntax]. Supported syntaxes: C# (cs, csharp), Ruby (rb, ruby),
  JavaScript (javascript, js), Markdown (md, markdown), ActionScript (as, as2,
  as3, actionscript), Visual Basic (vb, vbscript), Objective-C (objc,
  objectivec), Batch Files (dos, bat),  C++ (cpp), PHP, XML, CSS, SQL, INI,
  SmallTalk, CoffeeScript, GO, Bash, Diff, Lua, Lisp, Java, Python, Perl,
  Django, Delphi, Apache.
So I guess use XML maybe? Let's test!

XML code:
<div id="poop">
 <p class="blah"><img src="asdf.gif" alt="asdasdasda" /></p>
</div>

Lumpy fucked around with this message at 15:34 on Jul 16, 2013

kedo
Nov 27, 2007

Lumpy posted:

use: code=html

However, I don't think it does syntax highlighting for HTML anyway.

Yeah, I always try that and am bummed out when it doesn't work.

Oh well.

fuf
Sep 12, 2004

haha
Thanks kedo.

The roots theme actually already does exactly what you described, but because the sidebar is on the right it ends up below the main content instead of above.

I got it working by changing the content and sidebar to float:right and moved the sidebar code above the content code. (I just hope this hasn't had any other effects :ohdear:)

The sidebar itself actually has a pretty complicated layout, and it's gonna be pretty hard to make it look good when it's at the top of the screen. For future reference: is it feasible to have two completely separate divs, one sidebar and one topbar, and show/hide them depending on media queries? I guess I could do it with display:none, but that would slow down the site because it has to load both each time, right?

kedo
Nov 27, 2007

Lumpy posted:

So I guess use XML maybe? Let's test!

Wooo, XML it is! Now I'll just have to post a disclaimer every time saying, "no, this isn't really XML," but whatever. It highlights syntax nicely so who gives a gently caress!


fuf posted:

I got it working by changing the content and sidebar to float:right and moved the sidebar code above the content code. (I just hope this hasn't had any other effects :ohdear:)

The only downside I can think of is that depending on what content you have living in the sidebar it could logically make more sense below the main content area from a content hierarchy perspective. Generally speaking you want your most important content first for SEO and users who disable stylesheets, but this is super granular and won't matter a whole lot for 99% of your users.


fuf posted:

The sidebar itself actually has a pretty complicated layout, and it's gonna be pretty hard to make it look good when it's at the top of the screen. For future reference: is it feasible to have two completely separate divs, one sidebar and one topbar, and show/hide them depending on media queries? I guess I could do it with display:none, but that would slow down the site because it has to load both each time, right?

Yep, but as long as it's not loading huge images or something we're probably talking milliseconds. Duplicate content of any sort is usually considered bad. However you can accomplish a lot with media queries and targeted Javascript, so even if you have shitloads of stuff going on in the sidebar I'd bet you could find a way to make it work in a mobile layout... it'd just require more time and effort.

clockworkjoe
May 31, 2000

Rolled a 1 on the random encounter table, didn't you?
a friend of mine got his wordpress site hacked and he'll have to recreate it from scratch. If he downloads the mysql database file, is there a local database browser program he can use to copy the posts from his site so he doesn't lose them entirely? How do you view/browse/copy data from a mysql database locally? I know it's just a text file but sorting through it with notepad++ is a pain in the rear end.

kedo
Nov 27, 2007

clockworkjoe posted:

a friend of mine got his wordpress site hacked and he'll have to recreate it from scratch. If he downloads the mysql database file, is there a local database browser program he can use to copy the posts from his site so he doesn't lose them entirely? How do you view/browse/copy data from a mysql database locally? I know it's just a text file but sorting through it with notepad++ is a pain in the rear end.

The easiest solution might be to do a local WP install with MAMP or something, import the database and then export a WordPress backup. You could try browsing the SQL file with phpMyAdmin or some similar program, but it's not going to be much easier than doing it with a text editor.

e: Also, what kind of hack was it? As long as they didn't get into the database you could probably just upload a fresh copy of WP and keep using the same database... most WP hacks I've seen in the past only infect php files and whatnot.

kedo fucked around with this message at 19:07 on Jul 16, 2013

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.

clockworkjoe posted:

a friend of mine got his wordpress site hacked and he'll have to recreate it from scratch. If he downloads the mysql database file, is there a local database browser program he can use to copy the posts from his site so he doesn't lose them entirely? How do you view/browse/copy data from a mysql database locally? I know it's just a text file but sorting through it with notepad++ is a pain in the rear end.

Does his web host have PHPMyAdmin or something similar? He can also install it stand-alone on his own machine, or through WAMP or the like.

edit: That'll teach me not to refresh the page before answering.

Sad Panda
Sep 22, 2004

I'm a Sad Panda.

Sad Panda posted:

With Google deciding to kill Google Latitude, I'm looking for an alternative. I use it on my travel blog to show where I last logged in from. I could just have a bit of text that I update myself, but then it wouldn't show the map like my Latitude widget does.

If no one has an idea for that. One thing that came to mind, is there a way to update widget text by email? I've got a Kindle that nearly always has email access so if I could email something saying for example "Medellin, Colombia" and then the wordpress widget displayed that it'd be something.

clockworkjoe
May 31, 2000

Rolled a 1 on the random encounter table, didn't you?

daggerdragon posted:

Does his web host have PHPMyAdmin or something similar? He can also install it stand-alone on his own machine, or through WAMP or the like.

edit: That'll teach me not to refresh the page before answering.

thanks for the help - I just used notepad++ to find the few posts that he didn't have backed up in a word file and sent him the raw text - he didn't have many so I didn't need to go that far with it.

New problem

I have a site that started as a network MU site but it's updated to the latest WP version. The problem comes from the file pathing for images. Images are uploaded to x.com/wp-content/blogs.dir/1/files/year/month but the media library sees them as x.com/files/year/month which is a 404

I'm not sure how to access the images in the directory directly either. But I can see the images when i go to the directory in FTP so I know they're getting uploaded.

relevant .htaccess part
code:
RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
how do i get the file path corrected?

kedo
Nov 27, 2007

Sad Panda posted:

If no one has an idea for that. One thing that came to mind, is there a way to update widget text by email? I've got a Kindle that nearly always has email access so if I could email something saying for example "Medellin, Colombia" and then the wordpress widget displayed that it'd be something.

This might work for you – WP Google Maps. It's not going to be quite as easy as just pressing a button on Latitude, but them's the breaks. You may need to get the professional version if you want to create a map for each post, or whatever.

Depending on how technologically / code proficient you are you could potentially do something that's a little more customized with the Google Maps API.

kedo
Nov 27, 2007

A client of mine is getting ready to launch a network of WordPress-driven blogs. I have tons of experience working with WP, but not with a network of individual blogs. I know there's a slew of plugins out there designed to make managing a bunch of separate installs easier... can anyone point me to their favorites and/or some articles about best practices?

a slime
Apr 11, 2005

b0red posted:

Depends on what type of content you are going for. I find manifest to be elegant for a text based site.

Thanks for posting this, I'm taking a look and I really like it. If anybody has recommendations along the same lines I would love to hear it (i.e., good minimalist content-focused themes)

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



I am looking for a plugin that allows a single image to be clicked on but it opens a gallery on the same page. I know a ton of plugins out there have slideshows and this effect is easy to create with Lightbox on a standard page. But the user needs to be able to create these themselves and add a shortcode to the page. Still looking but if anyone has an idea of what works please post here. :)

I'll see if I can find one in the meantime.

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer
I am having something odd happening to my site, I have some drop down menus on my front page, when I am on the front page not all of the drop downs show up, when I am on any other page the new ones show up. Anyone have any insight into why this might be happening?

Here is what it looks like on the front page:



Go to any other page and use the same dropdown you can see the two additional ones on the bottom, that are not showing up on the front page:

Flaggy fucked around with this message at 16:50 on Jul 22, 2013

fuf
Sep 12, 2004

haha
I'm no expert but is your front page cached somehow? Can you make other changes to that menu (not the popdown bit)?

Maybe the theme is doing something weird? Looking for references to is_front_page() in the code might help.

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer

fuf posted:

I'm no expert but is your front page cached somehow? Can you make other changes to that menu (not the popdown bit)?

Maybe the theme is doing something weird? Looking for references to is_front_page() in the code might help.

I am an idiot and just figured it out, thanks for that though. It did help.

Flaggy fucked around with this message at 16:57 on Jul 22, 2013

shelter
Nov 9, 2003

fuf posted:

Thanks kedo.

The roots theme actually already does exactly what you described, but because the sidebar is on the right it ends up below the main content instead of above.

I got it working by changing the content and sidebar to float:right and moved the sidebar code above the content code. (I just hope this hasn't had any other effects :ohdear:)

The sidebar itself actually has a pretty complicated layout, and it's gonna be pretty hard to make it look good when it's at the top of the screen. For future reference: is it feasible to have two completely separate divs, one sidebar and one topbar, and show/hide them depending on media queries? I guess I could do it with display:none, but that would slow down the site because it has to load both each time, right?

FYI, you can post on the Roots Google Group to get answers for your questions: https://groups.google.com/forum/#!forum/roots-theme

(I made Roots)

fuf
Sep 12, 2004

haha

Flaggy posted:

I am an idiot and just figured it out, thanks for that though. It did help.

Literally the first time I have been vaguely helpful in this thread after years of asking stupid questions.

shelter posted:

FYI, you can post on the Roots Google Group to get answers for your questions: https://groups.google.com/forum/#!forum/roots-theme

(I made Roots)

Cool, thanks, I will.

Again: I really, really like Roots. :)

fuf
Sep 12, 2004

haha
Sorry double post.

I don't think this is a question about Roots but maybe I should be asking on that google group.

I'm trying to change the text for the comment-reply-link to something other than "Reply".

There's nothing in the theme, and the only reference I can find is to $reply_text in includes/comment-template.php, but I can't actually see where that is defined. I can get it working by just replacing $reply_text with my new text but that seems like a bad solution because I'm changing stuff outside the theme directory.

How else could I do it?

Ned
May 23, 2002

by Hand Knit

fuf posted:

Sorry double post.

I don't think this is a question about Roots but maybe I should be asking on that google group.

I'm trying to change the text for the comment-reply-link to something other than "Reply".

There's nothing in the theme, and the only reference I can find is to $reply_text in includes/comment-template.php, but I can't actually see where that is defined. I can get it working by just replacing $reply_text with my new text but that seems like a bad solution because I'm changing stuff outside the theme directory.

How else could I do it?

Stole the answer from here: http://wordpress.org/support/topic/how-to-change-wording-of-leave-a-reply

code:
function comment_reform ($arg) {
$arg['title_reply'] = __('Submit a comment:');
return $arg;
}
add_filter('comment_form_defaults','comment_reform');
Basically you need to apply a filter and that will replace the default text without modifying the core.

fuf
Sep 12, 2004

haha

Ned posted:

Stole the answer from here: http://wordpress.org/support/topic/how-to-change-wording-of-leave-a-reply

code:
function comment_reform ($arg) {
$arg['title_reply'] = __('Submit a comment:');
return $arg;
}
add_filter('comment_form_defaults','comment_reform');
Basically you need to apply a filter and that will replace the default text without modifying the core.

Awesome, thanks.

The function I need to change is actually "comment_reply_link", so I tried this instead:
code:
function comment_reform ($arg) {
$arg['reply_text'] = __('new reply text');
return $arg;
}
add_filter('comment_reply_link','comment_reform');
but it didn't work (because I have no idea what I'm doing).

But that link you posted had another solution based on where comment_reply_link is called in the theme's comment.php file and I got it working that way (I was gonna post the code but the lines are too long and break the tables).

The main thing is there are no changes to the core files anymore. :)

kedo
Nov 27, 2007

kedo posted:

A client of mine is getting ready to launch a network of WordPress-driven blogs. I have tons of experience working with WP, but not with a network of individual blogs. I know there's a slew of plugins out there designed to make managing a bunch of separate installs easier... can anyone point me to their favorites and/or some articles about best practices?

Quoting myself coz I'm still interested in an answer, if anyone has experience with this.

I'm looking into ManageWP at the moment... has anyone used them in the past?

Weird Uncle Dave
Sep 2, 2003

I could do this all day.

Buglord
At work, we have about fifty WP sites. I manage them all with InfiniteWP. Its pricing is one-time, not subscription. Also, you run it on your own server (we needed this because some of our WP sites are internal, so something like ManageWP wouldn't be able to communicate with them).

It's alright. Does everything I need, but it's missing polish in a few places (like, say, being able to sort/alphabetize my list of sites would be swell). Wouldn't hurt to play with it. The only downside, and this is pretty minor, is that you do have to host it yourself, and it's slightly more complex to install InfiniteWP than a WordPress site. It's not difficult by any means (if you know how to create a database manually, you're golden), but it's no famous five-minute install.

Adbot
ADBOT LOVES YOU

kedo
Nov 27, 2007

Weird Uncle Dave posted:

At work, we have about fifty WP sites. I manage them all with InfiniteWP. Its pricing is one-time, not subscription. Also, you run it on your own server (we needed this because some of our WP sites are internal, so something like ManageWP wouldn't be able to communicate with them).

It's alright. Does everything I need, but it's missing polish in a few places (like, say, being able to sort/alphabetize my list of sites would be swell). Wouldn't hurt to play with it. The only downside, and this is pretty minor, is that you do have to host it yourself, and it's slightly more complex to install InfiniteWP than a WordPress site. It's not difficult by any means (if you know how to create a database manually, you're golden), but it's no famous five-minute install.

That looks like exactly what I'm looking for, thanks!

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