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
Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
I'm totally stealing that script, thanks.

Also something of note worth looking into - Amazon's Free Tier for their cloud services is very good - I have a bunch of sites running off a nginx + php/mysql install and it is both fast and cheap and I don't have to deal with a third party host at all.

Adbot
ADBOT LOVES YOU

Stoph
Mar 19, 2006

Give a hug - save a life.
EC2 is great until your hard drive randomly dies or your machine just disappears. You have to know how to keep backups and be willing to accept downtime with a setup like that. Sometimes you may just end up recreating the machine from backups because figuring out what's wrong isn't worth it.

EC2 is perfect if you're a professional Linux sysadmin but I think it's harder to justify for the average web developer. I have a shared hosting plan for $10 year that lets me make one click backups and loads pages acceptably fast.

DNQ
Sep 7, 2004

Let me hear you balalaika's ringing out, come and keep your comrade warm!
Thanks guys - yes kedo it was .htaccess which kept getting over-written with re-directs all the time. What I've actually done now is delete wordpress (everything including the database etc) and then changed all my passwords (SQL, etc) and started to go through the tips in the link Adraeus posted.

So far so good which is a good sign as before it was literally happening every few hours. Some of the tips are a little beyond my technical capabilities/knowledge so I'm sure there'll be some security issues still but I'm hoping I've nailed the big ones.

My only issue now (unrelated to security) is all my images show up stretched and skinny on mobile devices. I've read I might need custom css upgrade but surely there's a way built in I can fix this? After all I am just using the basic Wordpress Twenty Twelve theme so I'm sure there's got to be a way to get around it.

kedo
Nov 27, 2007

Anyone aware of a plugin that allows the creation of nested ordered/unordered lists via the WYSIWYG editor? I have a client who hates editing HTML, but needs nested lists.


edit: Disregard this... turns out clicking the indent button while editing a list does exactly this. Not sure how I never figured that out until now. :downs:

kedo fucked around with this message at 21:21 on Feb 4, 2013

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



Anyone familiar with the Post 2 Post plugin?

https://github.com/scribu/wp-posts-to-posts/wiki

I am a pure newbie with Wordpress and for the most part it seems fine but this plugin that my company is using (just got hired on) seems to be messing me up. I am running into a issue where I am making a CSV file with dealerships and members. I can make a regular one but certain members are associated with multiple dealerships. When I make the CSV file it will only print the first occurrence of the persons name and skip them each time. Here is a snippet of the code.

PHP code:

function generate_csv2(){
		global $wpdb;
		
		$args = array('post_type'=>'members','post_status'=>'publish','numberposts'=>'-1', 'order'=>'ASC', 'order_by'=>'post_title');
		$members = get_posts($args);

		$mem_arr = array();
		foreach($members as $member){
			$member_meta = get_post_meta($member->ID);
			
			$query = "SELECT wp_p2p.p2p_from
				FROM wp_p2p
				WHERE wp_p2p.p2p_to = '".$member->ID."'";
			$result = $wpdb->get_results($query);
			

			$location = get_post($result[0]->p2p_from);
	
			$location_meta = get_post_meta($location->ID);
			print_r($location_meta);
			
			$member_data = new stdClass();
			$member_data->Company = $location->post_title;
			$member_data->First_Name = $member_meta['member_first_name'][0];
			$member_data->Last_Name = $member_meta['member_last_name'][0];
			$member_data->Title = $member_meta['member_title'][0];
			$member_data->Address_1 = $location_meta['location_address_1'][0];
			$member_data->Address_2 = $location_meta['location_address_2'][0];
			$member_data->City = $location_meta['location_city'][0];
			$member_data->Province = $location_meta['location_province'][0];
			$member_data->Postal_Code = $location_meta['location_postal'][0];
			$member_data->Phone = $location_meta['location_phone'][0];
			$member_data->Fax = $location_meta['location_fax'][0];
			$member_data->Toll_Free_Phone = $location_meta['location_phone_toll_free'][0];
			$member_data->Toll_Free_Fax = $location_meta['location_fax_toll_free'][0];
			$member_data->Website = $location_meta['location_website'][0];
			$member_data->Email = $member_meta['member_email'][0];
			$member_data->MemberType = $member_meta['member_type'][0].' Member';
			$member_data->Area = $location_meta['location_area'][0];
			$member_data->Franchise = $location_meta['location_franchise'][0];
			
			$mem_arr[] = $member_data;
		}

		// Loop through $mem_arr, print header_row

		$csv_head = '';
		$i=0;
		foreach($mem_arr[0] as $key=>$val){
			++$i;
			$csv_head.= '"'.str_replace("_", " " , $key).'"';
			$csv_head.= ($i<count( (array) $mem_arr[0])) ? ',' : "\r\n";
		}
		
		foreach($mem_arr as $mem){
			$myvars = get_object_vars($mem);
			$i=0;
			foreach($myvars as $vars){
				$i++;
				$csv_body.= '"'. $vars .'"'; 
				$csv_body.= ($i<count( $myvars)) ? ',' : "\r\n";
			}
		}
		header('Content-type: application/excel');
		header('Content-Disposition: attachment; filename="mmda_member_roster.csv"');
		header('Content-Transfer-Encoding: binary');
		print($csv_head.$csv_body);
		exit;
	}
I am trying to find out where or why each occurrence gets skipped.

EDIT; If it helps, this is where I register the members type which only pulls in 1 unique member.

PHP code:
function create_custom_post_types() {
		register_post_type( 'members',
			array(
				'labels' => array(
				    'name' => _x( 'Members','' ),
				    'singular_name' => _x( 'Member' ,'' ),
				    'add_new' => _x( 'Add New', '' ),
				    'add_new_item' => __( 'Add New Member' ),
					'edit' => __( 'Edit' ),
				    'edit_item' => __( 'Edit Member' ),
				    'new_item' => __( 'New Member' ),
					'view' => __( 'View Member' ),
				    'all_items' => __( 'All Members' ),
				    'view_item' => __( 'View Member' ),
				    'search_items' => __( 'Search Members' ),
				    'not_found' =>  __( 'No Members found' ),
				    'not_found_in_trash' => __( 'No members found in Trash' ),
				),
			    'public' => true,
			    'publicly_queryable' => true,
			    'show_ui' => true, 
			    'show_in_menu' => true, 
			    'query_var' => true,
			    'rewrite' => true,
			    'capability_type' => 'post',
			    'has_archive' => true, 
			    'hierarchical' => false,
			    'menu_position' => null,
			    'supports' => array( 'thumbnail','page-attributes' )
			)
		);

Vintersorg fucked around with this message at 23:25 on Feb 4, 2013

stormrider
Sep 18, 2003

Absolut Awful
Anyone have experience with a "Social Content Locker" like this one: http://codecanyon.net/item/social-content-locker-for-wordpress/2221015 ?

The general idea being that your readers have to do some kind of social action- Like, tweet, whatever, to access the content on a page.

Ideally looking for a free one as I'm just trying to do some giveaways.

Adraeus
Jan 25, 2008

by Y Kant Ozma Post

stormrider posted:

Anyone have experience with a "Social Content Locker" like this one: http://codecanyon.net/item/social-content-locker-for-wordpress/2221015 ?

The general idea being that your readers have to do some kind of social action- Like, tweet, whatever, to access the content on a page.

Ideally looking for a free one as I'm just trying to do some giveaways.

I don't know of a free one. WPMU DEV's 1-month membership is $39.50 right now. That will get you access to lot of great plugins, including Pay with a Like. You can continue to use plugins you've downloaded from them after your membership expires. You just won't get any updates, which isn't a big loss if you know PHP. I have most of their plugins installed, which has greatly reduced my development time.

Broccoli Must Die!
Aug 12, 2004

Meow.
I'm after a simple sidebar plugin that does this:

If the server time is between x and y, display this clickable image. Otherwise, display this image.

I could probably knock something up myself, but after a plugin already available to save mucking about. Any suggestions?

Adraeus
Jan 25, 2008

by Y Kant Ozma Post

Broccoli Must Die! posted:

I'm after a simple sidebar plugin that does this:

If the server time is between x and y, display this clickable image. Otherwise, display this image.

I could probably knock something up myself, but after a plugin already available to save mucking about. Any suggestions?

http://stackoverflow.com/questions/5413505/is-time-between-two-other-times

Broccoli Must Die!
Aug 12, 2004

Meow.

Thanks, I'll just do this.

cheese eats mouse
Jul 6, 2007

A real Portlander now

One tip that can help with speed is not using .PNG files for stuff that should be a compressed JPG. PNGs are better for 2-3 colors, repeating stuff, and images that have a transparent background. You're uploading 1MB+ PNG files that should be 200-300k JPG files. Also that massive background image on the body could be sliced up better. There's also a ton of flash, which is a notorious resource hog (and the whole reason it's dying).

This should be a JPG not a 1MB PNG.

From a design standpoint I wouldn't recommend a blog-roll for your site. More like something with the latest big upcoming event for the week and under a future events section.



cheese eats mouse fucked around with this message at 17:32 on Feb 5, 2013

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer
I have a regular old gallery that I want to speed up a bit, I tried looking in the media.php file, what file should I be looking in?

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
Hacking the WP files themselves is not going to be the best way to do that - maybe write a plugin? What do you need to speed up?

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer

Gyshall posted:

Hacking the WP files themselves is not going to be the best way to do that - maybe write a plugin? What do you need to speed up?

Just want to speed up the time between pictures.

spiritual bypass
Feb 19, 2008

Grimey Drawer
That's probably something in your theme

cheese eats mouse
Jul 6, 2007

A real Portlander now
If it's JS based it should be as simple as changing some numbers.

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer

cheese eats mouse posted:

If it's JS based it should be as simple as changing some numbers.

Pretty sure it is, just can't find the numbers to change.

stormrider
Sep 18, 2003

Absolut Awful

Adraeus posted:

I don't know of a free one. WPMU DEV's 1-month membership is $39.50 right now. That will get you access to lot of great plugins, including Pay with a Like. You can continue to use plugins you've downloaded from them after your membership expires. You just won't get any updates, which isn't a big loss if you know PHP. I have most of their plugins installed, which has greatly reduced my development time.

Found this one: http://wordpress.org/extend/plugins/wplike2get/

Pretty easy to set up and seems to be working fine.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION
I'm kind of at my wits end here. All I'm trying to do is add a custom image size to enable Wordpress to generate appropriately sized images for my featured post carousel. The size I'm wanting is 650x300. So I've added this to my theme's functions.php file:

PHP code:
add_theme_support( 'post-thumbnails' );
add_image_size( 'feature-slider-image', 650, 300, true);
function bavg_image_sizes_choose( $sizes ) {  
    $custom_sizes = array(  
        'feature-slider-image' => 'Featured Post Slider Panel'  
    );
    return array_merge( $sizes, $custom_sizes );  
}

add_filter( 'image_size_names_choose', 'bavg_image_sizes_choose' );  
But it doesn't work. At all. No thumbnail images are even created, let alone available for selection when inserting media. Any ideas on what I've messed up here? It seems as though the first part - adding thumbnail support to the theme - isn't even working at all. I feel like if I can fix that, the rest will be fine.

Edit: Even more puzzling, I thought maybe there was just some caching error going on so I installed the AJAX Thumbnail Rebuilder plugin which is supposed to go through each of your images and rebuild the thumbnails (for cases where you might change your thumbnail sizes after some images have already been posted in the past). The custom thumbnail size is shown in the list when I run it, but no thumbnails (even the standard ones) are actually created.

putin is a cunt fucked around with this message at 00:34 on Feb 6, 2013

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
Are you using a Custom Theme? Child theme? Commercial Theme? I've had problems with some functions/filters in Child Themes we have, which sucks and is too annoying for me to try to fix.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

Gyshall posted:

Are you using a Custom Theme? Child theme? Commercial Theme? I've had problems with some functions/filters in Child Themes we have, which sucks and is too annoying for me to try to fix.

Custom theme, but not a child. Built from scratch by myself so I've even tried it with the functions file completely cleared EXCEPT for the code I posted above. It's incredibly frustrating because I can't find anything wrong with what I've done, and all of the Googling I do suggests the exact same code.

Edit: I also posted this question on Stack Overflow and no one has responded there either, so I'm thinking it's something annoyingly obscure.

Edit again: I even tried moving the theme onto a brand new installation of Wordpress and it doesn't work there either, so it doesn't seem to be a plugin problem or anything like that.

putin is a cunt fucked around with this message at 01:34 on Feb 6, 2013

Adraeus
Jan 25, 2008

by Y Kant Ozma Post

Gnack posted:

But it doesn't work. At all. No thumbnail images are even created, let alone available for selection when inserting media. Any ideas on what I've messed up here? It seems as though the first part - adding thumbnail support to the theme - isn't even working at all. I feel like if I can fix that, the rest will be fine.

Edit: Even more puzzling, I thought maybe there was just some caching error going on so I installed the AJAX Thumbnail Rebuilder plugin which is supposed to go through each of your images and rebuild the thumbnails (for cases where you might change your thumbnail sizes after some images have already been posted in the past). The custom thumbnail size is shown in the list when I run it, but no thumbnails (even the standard ones) are actually created.

Enable error reporting and check if you have the GD library installed.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

Adraeus posted:

Enable error reporting and check if you have the GD library installed.

You are a beautiful person - seriously, this was driving me insane.

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer
Does anyone have any recommendation as far as plugins go that allow a customer to sign in and have access to special pages while the general public doesn't?

Shadowstar
May 19, 2003

~~~~~~~~~
S2member does this and I live it.

Maniaman
Mar 3, 2006
A local church that I do computer work for has a WordPress site and they are wanting to put audio recordings of the pastors message online each week. It's an older less tech savvy congregation currently, so I need a method that lets us upload the audio and link to it in a blog post preferably with a simple player that will stream it youtube-style. Anyone have any recommendations?

e: what's the best all-around caching plugin for WP these days?

Maniaman fucked around with this message at 21:24 on Feb 8, 2013

Calyn
Sep 3, 2011

Maniaman posted:

A local church that I do computer work for has a WordPress site and they are wanting to put audio recordings of the pastors message online each week. It's an older less tech savvy congregation currently, so I need a method that lets us upload the audio and link to it in a blog post preferably with a simple player that will stream it youtube-style. Anyone have any recommendations?

e: what's the best all-around caching plugin for WP these days?

I know Wordpress.com has a shortcode which lets you embed audio via URL, if your WP is not hosted there you can use this plugin instead: http://wordpress.org/extend/plugins/audio-player/

For caching plugins it's pretty much between WP Super Cache and W3 Total Cache. I prefer the latter due to more options, but you could just try them both out.

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer


I am having an issue where the text is supposed to be in the box, can't figure out why its doing it. Any help would be much appreciated, if you have any question or need the website let me know. I am using a TinyMCE widget plugin with 1/3 columns.

kedo
Nov 27, 2007

Flaggy posted:



I am having an issue where the text is supposed to be in the box, can't figure out why its doing it. Any help would be much appreciated, if you have any question or need the website let me know. I am using a TinyMCE widget plugin with 1/3 columns.

:10bux: says there's a set height on that box in a CSS doc somewhere.. Remove it, or change it to height: auto;

If not, try adding a clearfix to the bottom of that container. And/or overflow:auto; to the container.

foghorn
Oct 9, 2006

Haters gunna hate.
I'm looking for a plugin or something that performs what I think is a pretty simple task.

All I need it to do is check the database and put a list of all the posts that were posted on that day into a new post. A digest post, if you will, of the day's posts. Preferably one that does it automatically every day at a certain time.

Anyone seen anything like that?

greazeball
Feb 4, 2003



I'm looking for a scheduling/booking plugin for what may be a special situation. I want to offer practice speaking tests for ESL exams, and many of these exams are done with 2 students at the same time. The exam takes about 15 minutes but I want to book 30 minute sessions for it. I'd like to be able to set my hours and then the first student will choose their exam and select 3-4 hours (so 6-8 sessions) they are available. Then another student comes in who has selected the same exam, checks the calendar and either chooses one session that matches the first student's availability or sets their own availability. If there's a match and the second student joins one of the first student's sessions, the plugin should automatically remove the extra sessions, send confirmation and reminder emails, be able to go to paypal, etc. It would be nice if the first student could adjust their availability as well, in case the second student set theirs and the first student decides they can do it at one of their times.

It's all rather complicated, what are the best affordable options in this area? Appointments+ is the cheapest (assuming I don't need support), I also looked at booking calendar but it seems the best options are in the more expensive packages. Can these do what I need anyway? Any other options I should look at?

Sad Panda
Sep 22, 2004

I'm a Sad Panda.
This is probably a really simple question, but I can't find it googling about. I have a blog about my round the world bike trip and want a thing saying "On the road for <days since April 21st 2011> days" but can't work out how to do it. I guess there's some simple javascript or plugin to use, but I'm being useless.

Calyn
Sep 3, 2011

Sad Panda posted:

This is probably a really simple question, but I can't find it googling about. I have a blog about my round the world bike trip and want a thing saying "On the road for <days since April 21st 2011> days" but can't work out how to do it. I guess there's some simple javascript or plugin to use, but I'm being useless.

Add this to your theme file where you want it to appear:

code:
On the road for <?php echo floor((time()-strtotime("2011-04-21"))/(60*60*24)); ?> days.

kells
Mar 19, 2009
I've tried searching but haven't had a huge amount of luck - is there a plugin that add the Wordpress.com-type 'New Post' page (a drop-down thing that lets you pick from text/photo/video/link and lets you post from there rather than taking you to the dashboard)?

I'm working on a multisite project and navigating the dashboard each time they want to add content may be a bit too much for the intended users. The Wordpress.com new post feature is very user-friendly.

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



So many questions. :3:

I am needing to export a list of companies from my Wordpress site and use that file to update a MS Access DB (client has a old site that needed work and they can't pay for updating it to a wordpress site). I tried using the export XML tool but it gives a giant rear end file when there is only 172 companies to export. I was looking around on Google but couldn't find a simple tool to get me something like:

XML code:
<companies>
       <company>
             <name>
             <city>
             <province>
etc etc
Any idea if such a plugin or function works?

Ned
May 23, 2002

by Hand Knit

Vintersorg posted:


Any idea if such a plugin or function works?

Probably not - you'd have to write your own loop to display that info. It isn't hard if you know what you are doing.

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid
Did anybody experience any issues after uploading to the latest wordpress?
My media upload function seems to have slowed down A LOT, so there is a delay between inserting an image and having it actually show up and/or adding a featured image.

el Brainvomito
Dec 30, 2008

by T. Finninho
I feel so stupid to ask this, but since any embedding method doesn't work, how the corky hell you add Youtube/Vimeo-videos in the post? What plugin I need? All I get is these "Add gazillion videos on your sidebar/banner"-things, when I need just one video on my page.

drat you iFrame-haters!

Question Mark Mound
Jun 14, 2006

Tokyo Crystal Mew
Dancing Godzilla

el Brainvomito posted:

I feel so stupid to ask this, but since any embedding method doesn't work, how the corky hell you add Youtube/Vimeo-videos in the post? What plugin I need? All I get is these "Add gazillion videos on your sidebar/banner"-things, when I need just one video on my page.

drat you iFrame-haters!
I use Ultimate TinyMCE to add extra functionality to the WYSIWYG blog post editor. I don't know if it supports Vimeo, though. For that, you could always just go into the HTML editing mode and copy/paste in the embed code from the site.

Adbot
ADBOT LOVES YOU

kedo
Nov 27, 2007

el Brainvomito posted:

I feel so stupid to ask this, but since any embedding method doesn't work, how the corky hell you add Youtube/Vimeo-videos in the post? What plugin I need? All I get is these "Add gazillion videos on your sidebar/banner"-things, when I need just one video on my page.

drat you iFrame-haters!

Jetpack lets you just copy and paste the URL for a video into a page/post and then automagically converts it into an embed. It theoretically respects the maximum media dimensions you've set, but can be finicky at times. Also requires a WordPress.com account. But it's one of the easiest ways to embed video from a content editor perspective.

Not sure if it uses iframes or not, but those are hard to avoid with some video services. :smith:

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