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 05-15-2015, 02:49 AM   #1
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
How to make bulk list from Wordpress posts?

hey trolls,
got a question: what if i would like to make a list of urls + descriptions with pipe delimiter like the list for TGPX from Wordpress posts so i could easy use it as galleries for TGPX - is it possible, do you know any plugin which can do this?
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-15-2015, 07:27 AM   #2
zerovic
Confirmed User
 
zerovic's Avatar
 
Industry Role:
Join Date: Apr 2010
Posts: 1,062
Something like this?

open an empty file, copy/paste the code and upload to your sites root

Code:
<?php
include('wp-load.php');
if($_POST['number']) {
query_posts('showposts=' . $_POST['number']);
while (have_posts()) : the_post();
echo the_permalink() . $_POST['separator'] . get_the_content() . "<br />";
endwhile;
} else {
echo "<form method=\"post\">";
echo "<label>number of posts</label> <input type=\"text\" name=\"number\" /><br />";
echo "<label>separator</label> <input type=\"text\" name=\"separator\" /><br />";
echo "<input type=\"submit\" value=\"export\" />";
echo "</form>";
}
?>
__________________
php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com
zerovic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-15-2015, 07:54 AM   #3
zerovic
Confirmed User
 
zerovic's Avatar
 
Industry Role:
Join Date: Apr 2010
Posts: 1,062
here's another version..sorry, the code is a bit messy, but does the job you need

this will work with links, titles and descriptions.. you set the number of posts, separator and the order you want to display and it will display it to you...

again, the code is messy as hell, but it works

Code:
<?php
include('wp-load.php');
if($_POST['number']) {
query_posts('showposts=' . $_POST['number']);
while (have_posts()) : the_post();

if($_POST['order_1'] == "url") {
echo the_permalink();
}
if($_POST['order_1'] == "title") {
echo get_the_title();
}
if($_POST['order_1'] == "description") {
echo get_the_content();
}

if($_POST['order_1'] != "none") { if($_POST['separator'] == "tab") { echo "\t"; } else { echo $_POST['separator']; } }

if($_POST['order_2'] == "url") {
echo the_permalink();
}
if($_POST['order_2'] == "title") {
echo get_the_title();
}
if($_POST['order_2'] == "description") {
echo get_the_content();
}

if($_POST['order_2'] != "none") { if($_POST['separator'] == "tab") { echo "\t"; } else { echo $_POST['separator']; } }

if($_POST['order_3'] == "url") {
echo the_permalink();
}
if($_POST['order_3'] == "title") {
echo get_the_title();
}
if($_POST['order_3'] == "description") {
echo get_the_content();
}

echo "<br />";

endwhile;

} else {

echo "<form method=\"post\">";
echo "<label>Number Of Posts</label> <input type=\"text\" name=\"number\" /><br />";

echo "<label>Order</label> <select name=\"order_1\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select>";

echo "<select name=\"order_2\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select>";

echo "<select name=\"order_3\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select><br />";

echo "<label>Separator</label> <select name=\"separator\"><option value=\"|\">|</option><option value=\"tab\">TAB</option><option value=\";\">;</option><option value=\":\">:</option></select>";

echo "<input type=\"submit\" value=\"export\" />";
echo "</form>";
}
?>
__________________
php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com
zerovic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-15-2015, 08:40 AM   #4
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
Quote:
Originally Posted by zerovic View Post
here's another version..sorry, the code is a bit messy, but does the job you need

this will work with links, titles and descriptions.. you set the number of posts, separator and the order you want to display and it will display it to you...

again, the code is messy as hell, but it works

Code:
<?php
include('wp-load.php');
if($_POST['number']) {
query_posts('showposts=' . $_POST['number']);
while (have_posts()) : the_post();

if($_POST['order_1'] == "url") {
echo the_permalink();
}
if($_POST['order_1'] == "title") {
echo get_the_title();
}
if($_POST['order_1'] == "description") {
echo get_the_content();
}

if($_POST['order_1'] != "none") { if($_POST['separator'] == "tab") { echo "\t"; } else { echo $_POST['separator']; } }

if($_POST['order_2'] == "url") {
echo the_permalink();
}
if($_POST['order_2'] == "title") {
echo get_the_title();
}
if($_POST['order_2'] == "description") {
echo get_the_content();
}

if($_POST['order_2'] != "none") { if($_POST['separator'] == "tab") { echo "\t"; } else { echo $_POST['separator']; } }

if($_POST['order_3'] == "url") {
echo the_permalink();
}
if($_POST['order_3'] == "title") {
echo get_the_title();
}
if($_POST['order_3'] == "description") {
echo get_the_content();
}

echo "<br />";

endwhile;

} else {

echo "<form method=\"post\">";
echo "<label>Number Of Posts</label> <input type=\"text\" name=\"number\" /><br />";

echo "<label>Order</label> <select name=\"order_1\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select>";

echo "<select name=\"order_2\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select>";

echo "<select name=\"order_3\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select><br />";

echo "<label>Separator</label> <select name=\"separator\"><option value=\"|\">|</option><option value=\"tab\">TAB</option><option value=\";\">;</option><option value=\":\">:</option></select>";

echo "<input type=\"submit\" value=\"export\" />";
echo "</form>";
}
?>
didn't tried 1st code, just 2nd one - works perfect!
thanks a lot, let me know if you would have some asian site i'll help you start with some traffic
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-15-2015, 09:08 AM   #5
zerovic
Confirmed User
 
zerovic's Avatar
 
Industry Role:
Join Date: Apr 2010
Posts: 1,062
you're welcome! have a great weekend ;)
__________________
php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com
zerovic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-15-2015, 09:10 AM   #6
AmeliaG
Too lazy to set a custom title
 
AmeliaG's Avatar
 
Join Date: Jan 2003
Location: Los Angeles
Posts: 10,417
thanks! I am going to try this
AmeliaG is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 12:34 AM   #7
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
diggin up my old topic.

how can i get bulk list of posts with certain category?
current code list posts from index page what if i want one category only, is it possible?

this piece of code Zerovic wrote is really useful if i can pick up category i want it will be excellent.
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 01:29 AM   #8
stoka
Confirmed User
 
stoka's Avatar
 
Join Date: Dec 2005
Posts: 956
include cat variable with query_posts, like

query_posts('cat=ABC&showposts=' . $_POST['number']);

where ABC is tag_ID of the category you want
stoka is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 01:51 AM   #9
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
tried, but if i got let's say "Filipina Sex" category (filipina-sex slug) it should look like this:

query_posts('cat=filipina-sex&showposts=' . $_POST['number']);

or

query_posts('cat=filipina sex&showposts=' . $_POST['number']);

?
cuz both ways won't work, still i got list of posts from index page not from filipina sex category.
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 02:16 AM   #10
stoka
Confirmed User
 
stoka's Avatar
 
Join Date: Dec 2005
Posts: 956
get tag_ID for filipina sex by going mouseover that category in wp admin. It's a number

here below is a version where you submit tag_ID through form
slightly adapted Zerovic's code

Code:
<?php
include('wp-load.php');
$args = array(
	'cat'     	=> $_POST['tag_id'],
	'showposts=' 	=> $_POST['number']
);

if($_POST['number']) {
query_posts($args);
while (have_posts()) : the_post();

if($_POST['order_1'] == "url") {
echo the_permalink();
}
if($_POST['order_1'] == "title") {
echo get_the_title();
}
if($_POST['order_1'] == "description") {
echo get_the_content();
}

if($_POST['order_1'] != "none") { if($_POST['separator'] == "tab") { echo "\t"; } else { echo $_POST['separator']; } }

if($_POST['order_2'] == "url") {
echo the_permalink();
}
if($_POST['order_2'] == "title") {
echo get_the_title();
}
if($_POST['order_2'] == "description") {
echo get_the_content();
}

if($_POST['order_2'] != "none") { if($_POST['separator'] == "tab") { echo "\t"; } else { echo $_POST['separator']; } }

if($_POST['order_3'] == "url") {
echo the_permalink();
}
if($_POST['order_3'] == "title") {
echo get_the_title();
}
if($_POST['order_3'] == "description") {
echo get_the_content();
}

echo "<br />";

endwhile;

} else {

echo "<form method=\"post\">";
echo "<label>Tag_ID</label> <input type=\"text\" name=\"tag_id\" /><br />";

echo "<form method=\"post\">";
echo "<label>Number Of Posts</label> <input type=\"text\" name=\"number\" /><br />";

echo "<label>Order</label> <select name=\"order_1\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select>";

echo "<select name=\"order_2\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select>";

echo "<select name=\"order_3\"><option value=\"none\">None</option><option value=\"url\">URL</option><option value=\"title\">Title</option><option value=\"description\">Description</option></select><br />";

echo "<label>Separator</label> <select name=\"separator\"><option value=\"|\">|</option><option value=\"tab\">TAB</option><option value=\";\">;</option><option value=\":\">:</option></select>";

echo "<input type=\"submit\" value=\"export\" />";
echo "</form>";
}
?>
stoka is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 02:24 AM   #11
EddyTheDog
Just Doing My Own Thing
 
EddyTheDog's Avatar
 
Industry Role:
Join Date: Jan 2011
Location: London, Spain, New Zealand, GFY - Not Croydon...
Posts: 24,822
Another way - Go to tools and export what you want:



You can then import that into Excel or another spreadsheet and play with the data as much as you want - Then just save it as a CSV (pipe delimited) - It would give you more control over the data...
EddyTheDog is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 02:26 AM   #12
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
almost perfect sir ;)
but smths is wrong with code.
when i choose 10 posts to be listed it lists 30+ posts
if ill choose to have url+description here's what i got:

Page not found | Asian Sex[gallery link="file" ids="14862,14863,14864,14865,14866,14867,14868,148 69,14870,14871,14872,14873,14874,14875,14876,14877 ,14878,14879,14880,14881,14882,14883,14884,14885"]|

beside this it's very ok, i can live without descriptions if it's a problem, however i don't know why it list 30 posts instead of 10 but if i put there 60 posts it's grabbed 60 so it's ok for me.

thanks a lot for willing to help so far, appreciate
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 02:51 AM   #13
stoka
Confirmed User
 
stoka's Avatar
 
Join Date: Dec 2005
Posts: 956
well dunno I only slightly changed the code, will take a closer look later today

from what I see above it outputs posts, not excerpts
if you have excerpt (description) for each post then you could get descriptions by replacing get_the_content() with the_excerpt ()

and it's simple code, go always with all parameters
stoka is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 03:11 AM   #14
stoka
Confirmed User
 
stoka's Avatar
 
Join Date: Dec 2005
Posts: 956
Quote:
Originally Posted by EddyTheDog View Post
Another way - Go to tools and export what you want:
yea this kind of solves it
stoka is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 09:13 AM   #15
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
thank you both guys Eddy and Stoka i've probably overcomplicated it using this script i didn't know about export option in wordpress i must admit :P

and thanks again Stoka for adding tag option for script, i like it and using it now ;)
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2016, 12:42 PM   #16
blogspot
So Fucking Banned
 
Industry Role:
Join Date: Jan 2016
Posts: 292
congrats all
blogspot 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

Tags
list, posts, wordpress, tgpx, easy, galleries, plugin, question, trolls, bulk, hey, pipe, delimiter, descriptions, urls



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.