Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-31-2013, 01:21 PM   #1
brassmonkey
Pay It Forward
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 76,897
:stop Wordpress user of gallery function

they've removed yet another feature in 3.5.1
to get the old back let me know if you have trouble.

file to edit: yoursite.com/wp-admin/includes/media.php

find:
Code:
add_action( 'media_buttons', 'media_buttons' );

function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) {
	global $post_ID;

	if ( empty( $post_id ) )
		$post_id = $post_ID;

	$upload_iframe_src = add_query_arg( 'post_id', (int) $post_id, admin_url('media-upload.php') );

	if ( $type && 'media' != $type )
		$upload_iframe_src = add_query_arg('type', $type, $upload_iframe_src);

	if ( ! empty( $tab ) )
		$upload_iframe_src = add_query_arg('tab', $tab, $upload_iframe_src);

	$upload_iframe_src = apply_filters($type . '_upload_iframe_src', $upload_iframe_src);

	return add_query_arg('TB_iframe', true, $upload_iframe_src);
}
after that add:
Code:
add_action('admin_head', 'remove_media_buttons');
function remove_media_buttons(){
remove_action('media_buttons','media_buttons');
add_action('media_buttons', 'old_media_buttons');
}

function old_media_buttons($editor_id = 'content') {
$context = apply_filters('media_buttons_context', __('Upload/Insert %s'));
$img = '<img src="' . esc_url( admin_url( 'images/media-button.png?ver=20111005' ) ) . '" width="15" height="15" />';
echo '<a href="' . esc_url( get_upload_iframe_src() ) . '" class="thickbox add_media" id="' . esc_attr( $editor_id ) . '-add_media" title="' . esc_attr__( 'Add Media' ) . '" onclick="return false;">' . sprintf( $context, $img ) . '</a>';
}
__________________
TRUMP 2025 KEKAW!!! - Support The Laken Riley Act!!!
END DACA - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-31-2013, 03:11 PM   #2
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,212
please dont hack core files ;)
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-31-2013, 03:24 PM   #3
brassmonkey
Pay It Forward
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 76,897
Quote:
Originally Posted by fris View Post
please dont hack core files ;)
as far as i know its ok. what?? you see a problem?
__________________
TRUMP 2025 KEKAW!!! - Support The Laken Riley Act!!!
END DACA - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-31-2013, 04:11 PM   #4
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,212
Quote:
Originally Posted by brassmonkey View Post
as far as i know its ok. what?? you see a problem?
because when you update your changes will be lost. and you will have to do it all over again.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-31-2013, 04:36 PM   #5
robwod
Confirmed User
 
Industry Role:
Join Date: Nov 2005
Posts: 2,539
The Wordpress native gallery feature is not removed from 3.5.1. We use the inline Wordpress gallery function all the time, including in 3.5.1.

You can either upload the pics through the Media area, or click to Add Media on the post screen itself. Select all of the files you want and click the upload button. After the pics are uploaded, simply click on the ones you want and select "insert gallery".

Unless you are talking about it being a different procedure to add a gallery than previous versions, the actually gallery function itself is still there.
__________________
NSFW
robwod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-31-2013, 04:37 PM   #6
robwod
Confirmed User
 
Industry Role:
Join Date: Nov 2005
Posts: 2,539
Quote:
Originally Posted by fris View Post
because when you update your changes will be lost. and you will have to do it all over again.
Changes like that are usually better done via a custom functions file in the theme itself, so long as there is a hook for it of course.

I seer this sort of thing a lot when people are suing the default twentyten, twentyeleven, twentytwelve themes. They'll edit those themes directly and then upgrade and lose all their edits. Many do not realize they should take advantage of the child theme functionality in wordpress when editing default themes.

For those interested in how to do it, see this Wordpress codex page:
http://codex.wordpress.org/Child_Themes
__________________
NSFW

Last edited by robwod; 03-31-2013 at 04:40 PM..
robwod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-31-2013, 04:42 PM   #7
brassmonkey
Pay It Forward
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 76,897
Quote:
Originally Posted by robwod View Post
The Wordpress native gallery feature is not removed from 3.5.1. We use the inline Wordpress gallery function all the time, including in 3.5.1.

You can either upload the pics through the Media area, or click to Add Media on the post screen itself. Select all of the files you want and click the upload button. After the pics are uploaded, simply click on the ones you want and select "insert gallery".

Unless you are talking about it being a different procedure to add a gallery than previous versions, the actually gallery function itself is still there.
big difference look at both its stripped way down.
__________________
TRUMP 2025 KEKAW!!! - Support The Laken Riley Act!!!
END DACA - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-31-2013, 04:45 PM   #8
robwod
Confirmed User
 
Industry Role:
Join Date: Nov 2005
Posts: 2,539
Quote:
Originally Posted by brassmonkey View Post
big difference look at both its stripped way down.
I'm not sure I see any real difference. It functions just perfect for us like it always has. If anything, it has increased the speed at which we can add galleries.

The one thing I do dislike, however, is that when selecting to insert the gallery, it defaults to attachment page. You must first select the type to "Link to Attachment" and then specify the Columns, and then re-select "Link to Media". Beyond that, I just do not see any difference.

Are you talking about image editing functionality?
__________________
NSFW
robwod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-31-2013, 04:58 PM   #9
brassmonkey
Pay It Forward
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 76,897
Quote:
Originally Posted by robwod View Post
I'm not sure I see any real difference. It functions just perfect for us like it always has. If anything, it has increased the speed at which we can add galleries.

The one thing I do dislike, however, is that when selecting to insert the gallery, it defaults to attachment page. You must first select the type to "Link to Attachment" and then specify the Columns, and then re-select "Link to Media". Beyond that, I just do not see any difference.

Are you talking about image editing functionality?
not going to talk about it just helping others add it back to classic
__________________
TRUMP 2025 KEKAW!!! - Support The Laken Riley Act!!!
END DACA - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-31-2013, 05:18 PM   #10
robwod
Confirmed User
 
Industry Role:
Join Date: Nov 2005
Posts: 2,539
No problem, I was just confused when you said the gallery function was removed, when clearly it is still there.

Carry on.
__________________
NSFW
robwod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-01-2013, 01:25 AM   #11
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,212
if you want the old method theirs a few plugins that do it via the post screen
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.