Go Back   Netpond ™ > Webmaster Forums and Resources > Tutorials
Register FAQ Calendar Radio and TV NP Shop Search Today's Posts Mark Forums Read

Tutorials Tutorials and helpful articles made by ponders for ponders

Megasite
Video Chat, Dating, Video On Demand, Megasite Reality, Celeb Orgy, Pissing, Shemale
Reply
 
LinkBack Thread Tools Display Modes
Old 05-03-2008, 07:43 AM   #1 (permalink)
redhatslut
WPMU Field Specialist
 
redhatslut's Avatar
 
Join Date: Apr 2008
Posts: 139
Points: 190
Send a message via ICQ to redhatslut Send a message via Yahoo to redhatslut
Talking Simple HowTo: WPMU parameters of a new blog schema.php, wpmu-functions.php Tutorial#4

Hi,

when you create a new blog, some actions are taken. Two main files responsible for that are:
/wp-include/wpmu-functions.php and /wp-admin/include/schema.php

You can edit both of them for your desired effect.
schema.php can be overriden by this plugin, if you don't want to edit the core files:
WPMUDEV.ORG

Let's take a look at schema.php

It defines all simple options which a blog will have, so you won't have to do it manually everytime.
for example find those lines, i modified them that way:

blog description: ...for all your porn needs
100 posts per rss

Rest is left default...

add_option('siteurl', $guessurl);
add_option('blogname', __('My Blog'));
add_option('blogdescription', sprintf(__('...for all your porn needs!'), $current_site->site_name ) );
add_option('new_users_can_blog', 0); add_option('users_can_register', 0);
add_option('admin_email', 'you@example.com'); add_option('start_of_week', 1);
add_option('use_balanceTags', 0); add_option('use_smilies', 1); add_option('require_name_email', 1); add_option('comments_notify', 1); add_option('posts_per_rss', 100); add_option('rss_excerpt_length', 50); add_option('rss_use_excerpt', 0);

It is so simple eveyone will figure it out.

For example you can add to add_option('ping_sites', '
http://zhuaxia.com/rpc/server.phphtt...om/rpc/../rpc/.
http://pinger.blogflux.com/rpc/../rp...m/rpc/../rpc//
http://pinger.blogflux.com/rpc/../rp...rpc/../rpc////
http://pinger.blogflux.com/rpc/../rp...c/../rpc//////
etc..............

And you dont have to add ping sites manually anymore :P

Everything here is simple.

Now wpmu-functions is more complicated, but you will figure it out. I will show you an example how to get rid of the annoying hello word post, and about page and how to change the name of uncategorized category by default.

Find lines:
$cat_name = $wpdb->escape(__('Uncategorized'));
$cat_slug = sanitize_title(__('Uncategorized'));

And change Uncategorized to for example Biatches!!!.

To delete first post, page and default links remove lines:

// Default links
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_owner, link_rss) VALUES ('http://wordpress.com/', 'WordPress.com', 1356, '$user_id', 'http://wordpress.com/feed/');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_owner, link_rss) VALUES ('http://wordpress.org/', 'WordPress.org', 1356, '$user_id', 'http://wordpress.org/development/feed/');"); $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (1, 2)" ); $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (2, 2)" );

// First post $now = date('Y-m-d H:i:s'); $now_gmt = gmdate('Y-m-d H:i:s'); $first_post = get_site_option( 'first_post' ); if( $first_post == false ) $first_post = stripslashes( __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' ) ); $first_post = str_replace( "SITE_URL", "http://" . $current_site->domain . $current_site->path, $first_post ); $first_post = str_replace( "SITE_NAME", $current_site->site_name, $first_post ); $first_post = stripslashes( $first_post ); $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_title, post_category, post_name, post_modified, post_modified_gmt, comment_count) VALUES ('".$user_id."', '$now', '$now_gmt', '".addslashes($first_post)."', '".addslashes(__('Hello world!'))."', '0', '".addslashes(__('hello-world'))."', '$now', '$now_gmt', '1')"); $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (1, 1)" ); update_option( "post_count", 1 );

// First page $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, post_status, post_type, to_ping, pinged, post_content_filtered) VALUES ('$user_id', '$now', '$now_gmt', '".$wpdb->escape(__('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'))."', '', '".$wpdb->escape(__('About'))."', '0', '".$wpdb->escape(__('about'))."', '$now', '$now_gmt', 'publish', 'page', '', '', '')"); // Flush rules to pick up the new page. $wp_rewrite->init(); $wp_rewrite->flush_rules();

Hope it gave some basics !!!!
redhatslut is offline   Reply With Quote Send a private message to redhatslut
Old 09-12-2008, 10:56 AM   #2 (permalink)
a-j
Want some creampie?
 
a-j's Avatar
 
Join Date: Dec 2007
Location: Central Europe
Posts: 100
Points: 500
Send a message via ICQ to a-j
Quote:
Originally Posted by redhatslut View Post
Very nice, that is exactly what I was searching for, thanks.

BUT
How are those urls in ping_sites delimited? Comma? Space?
__________________
My RSS Feed Sponsors List
a-j is offline   Reply With Quote Send a private message to a-j
Old 09-21-2008, 10:54 AM   #3 (permalink)
jcjc
Is Aga really Little Buddha?
 
jcjc's Avatar
 
Join Date: Jul 2008
Location: Shanghai,China
Posts: 1,033
Points: 225
Send a message via ICQ to jcjc
Thanks a lot, those auto added stuff are boring.
__________________
I can't improve myself without making mistakes, so if you find I'm wrong please clarify me, thanks in advance.

My avatar is my favorite girl, but unluckily I don't know her name...

Last edited by jcjc : Tomorrow at 28:93 AM.
jcjc is offline   Reply With Quote Send a private message to jcjc
Reply


Thread Tools
Display Modes



Netpond Resources
Resource Directory Tutorials & Articles Webmaster Tools Netpond News
 
Netpond Resources
LustDollars WildCash PussyCash Royal-Cash
Fetish Hits Cyberwurx MaxCash Fuck You Cash
AEBN GroobyBucks HD Pays PluginFeeds
Rabbits Reviews CraziesCash TrafficCashGold EvilAngelCash
Orgycash BigClicks Webcams Adult Pay Master
Free Porn Paradise British Porno British Porn Models ShanesworldCash
Reality, celeb Megasite, Gay, Shemale, Fetish
All times are GMT -4. The time now is 09:32 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
vBCredits v1.4 Copyright ©2007, PixelFX Studios