Build an Awesome Community News Feature for Your WordPress Blog

October 14, 2011 · 60 comments

by Lars

wp-user-link-feed

In this article tripwire magazine provides a detailed tutorial on how to setup a Community News Feed solution in WordPress 2.8+. I use it at tripwire magazine and currently get 30-50 links submitted every day. It’s a good way to interact with users and peer blogs!

Allowing your readers to provide interesting and relevant links to you and your other readers is nice feature as it gives a blog dynamic content. It actually also may drive traffic from bloggers looking for sources to get some easy and free traffic for their own site. Besides that links submitted are very useful for creating regular  news posts listing all or the best resources readers submitted. The solution provided have been tested and works with WordPress 2.7 to 2.8.6. This is a follow-up on a previous article taking TDO Mini Forms changes into account. I have also decided to add new options and taking reader comments into account. The post will show you how to:

  • create a Community Link Submit Page (demo)
  • create a Community Link Widget or custom code for sidebar (demo scroll down to find it)
  • create a Community Link page (demo)
  • filter out community links from RSS feeds


ElegantThemes
ThemeForest

Advertisement

Introduction

Adding a Community Link/Reader News Feed is currently quite popular and I have seen it on many of the very popular Web Development and Design Blogs i keep an eye on. Here is a few good examples that you can check out: Noupe, Psdtuts+. Even though Community Link/Reader News Feeds are popular there doen’t seam to be an easy way to implement it in WordPress. There is as far as I know currently no plugins and we lack good tutorials that binds all the elements together making it available for everyone. This post share the details of the solution created for and used on tripwire magazine. There are as usual more than one way of doing this. Some use the comments system in WordPress while others use their own proprietary database. In the solution I cover in this tutorial User Submitted content will be added as new posts in WordPress.

Step 1. Get the files.

The form

Submitting content to WordPress from the front end can be done in many ways but I think that one of the best and most flexible ways available is to use TDO Mini Forms. TDO is not exactly simple to configure to start with but as you start using it you will see that it gives you real power to make the Forms you want.

TDO Mini Forms: Download

The sidebar community post list

Listing posts from one Category in a widget can also be done in countless ways. You should really use the plugin or approach you prefer here but in this tutorial I have decided to use the plugin Query Posts. I have made a few changes to the plugin presentation template to make it fit my needs. I’m not that proud of this part but….well you may find a better and more generic way yourself if you’re not into changing code to preserve compatibility with future releases of the plugin. If you do please share and post a comment.

Query Posts: Download

As part of this follow-up I have extended the tutorial for Readers using themes without widgets showing you how to code functionality from ground up that pulls the submitted posts from the database and format the output as you prefer.

2. Install and activate the plugins you need

This is not a tutorial on how to install plugins in general but it is very simple. If you’re not going to use Query Posts plugin and plan to use the code version then only install TDO Mini Forms.

a. Upload the files under your wp-content/plugins directury

b. Log into WordPress back-end and click the Plugins menu button. Find the 2 new plugins under Inactive Plugins and press Activate.

3. Create a Page and a Category to hold the Form

You may call the page whatever you want but I suggest calling it "Submit User Link". There’s no reason to publish the page yet but you need it as a place holder. Describe at the top of the page if you have any rules for what resources will be approved.

Create a WordPress Categoty that the posts will be put into per default. In this tutorial the Category is called User-News (user-news)

4. Basic Configuration

Activating TDO Mini Forms (TDOMF) will add a Options Menu at the bottom of your WordPress Admin Menu.

Make sure you start with configuring TDOMF via the main TDOMF menu "Form Manager and Options" in the WordPress Administration back-end. You must assign a user as the "Default Author". This user must not have rights to publish or edit posts, i.e. they should be of the subscriber role. The TDOMF options menu can automatically create a dummy user to set as the Default Author. This is the recommended approach.

With a Default user selected you’re actually done setting up the basics. You may consider enabling the Akismet Spam Protection at the bottom of the page. I don’t use it myself and I have not experienced any spam issues. I generally think standard comments forms are much easier to target and that the effort needed for a spammer to use your custom form isn’t worth the time…

5. Creating the Form

You can use Form 1 or press the “New Form” button. This will add a Form 2 button next to Form 1. I’m not sure why the names are Form 1,2,x and keep being this after naming the form but you may call it a “feature”. Once the form is created press the Form 2 button. This takes you to the main Form 2 configuration page (or stay at Form 1 if you continue using this).

General Tab:

  • Put in the Form Name “User Link Feed”.
  • Check “
  • Finally if you like Ajax forms enable it. I’m using it and it really is a nice feature.

Access Control Tab:

  • Make sure that "Unregistered Users (i.e. everyone)" and "Users with rights to publish posts" can access the form.

Submitting Tab:

  • Set “Default Category” to the category created in step 3.

Moderation Tab:

  • Enable Moderation
  • You may check the check box just below if you want your own submission to go through directly.

Throttling Tab:

  • To prevent your WordPress from becoming spammed you should create a throttle rule. The default rule can be useful. Each IP address can only have 10 unapproved submissions per hour.

6. Setting up the Form Layout

Form Layouts in TDOMF is made by arranging widgets (these should not be confused with WordPress side bar widgets!)  To configure your widget press the create button.

First of all scroll to the bottom and set the Custom Field Widget to 3 and press save.

The make the following arrangement by dragging the field boxes from the area below the widget into it.

Configuration of the 3 custom fields and the content field can be seen here. Click on the images.

[nggallery id=9]

Add the following code to “Custom Fields 1″.

<?php
/* Set the link title for use in Append to Post Content 1*/
$LINKTITLE= get_post_meta($post_id, 'LINKTITLE', true);
if($LINKTITLE != false) {
   $link_title = $LINKTITLE;
} else {
   $link_title = '[No Link Title]';
}

?>
<p><a href="%%VALUE%%" target="_blank"><?php echo $link_title ?></a></p>

Add the following code to “Append to Post Content 1″.

<?php
/* Using value put into Custom Field 3 called  LINKTITLE to insert
custom title on post to make it stand out in the WordPress Posts view. */

$link_title = get_post_meta($post_id, 'LINKTITLE', true);

if($link_title != false) {
   $post_title = '[User Link:'.$link_title.']';
} else {
   $post_title = '[no link title set]';
}
$postdata = array(
         "ID" => $post_id,
         "post_title" => $post_title);
      sanitize_post($postdata,&quot;db&quot;);
      wp_update_post($postdata);
?>

The Form is basically set up now. To make the last hacks you have to go into Form Hack Mode.
Press the Form Hack Button and a page that gives you access to all the code is loaded.
What to do here:
1. Search for “URL:” and remove it. (makes the form look better)
2. Search for “Email:” and remove it.
3. If you want ot get rid of the preview button as well you can just locate the button input html and delete it.

Be aware that once you used the hack page you will not be able to use the form create page in the same way. TDO Mini Forms have made an attempt on solving the issue by introducing a kind of revision and diff functionality. It works OK but once you go into hack mode it is hacked and getting back is hard! SO DON’T start hacking until you’re form is finished with regards to number of input fields needed.

7. Add the form to the Submit User Link Page

Open the page you created in step 3 for editing. Insert this tag on the page as shown below (I can’t put in the code here as it will be turned into a form):

Visit the form page and try to submit a few User Links. NB! Depending on the configuration you decided on in step 5: If you’re logged in as an administrator on the Browser session your submissions will be published directly.

This is the end result at tripwire magazine.

8. Add the Sidebar widget

Here you will be able to either use Query Posts plugin or code it yourself.

Query Posts

Showing the links that users have submitted somewhere is necessary. If the Query Posts plugin was activated earlier as described you should navigate to the WordPress Widgets page.

Here you should Add a “Query Posts” widget to the sidebar and click edit. The configuration is simple but make sure you put in the id of the category you created in step 3 instead of 41.

Save the sidebar. Go to the blog and check if everything works as intended.

Code it yourself

Basically this is about finding a way to pull out the posts submitted by users. You can add this directly to the sidebar.php (or whatever it is called in your theme) or you can use widgets like Executable PHP widget.  I love this plugin and it is also useful here.

Add the following code. It first query the WordPress databse for published posts in a specific category “WHERE wp_term_taxonomy.term_id IN ( 41 )”. You have to replace 41 with the catid of your own category created in step 3. You will get maximum 10 posts returned unless you change it here “LIMIT 0 , 10″ );”. The script then steps through all records returned and prints the post content in a html list.

<ul>
<?php
global $wpdb;
$result = $wpdb->get_results(“SELECT *
FROM wp_posts as wpost
INNER JOIN wp_term_relationships ON wpost.ID = wp_term_relationships.object_id
INNER JOIN wp_term_taxonomy ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
AND wp_term_taxonomy.taxonomy = ‘category’
WHERE wp_term_taxonomy.term_id IN ( 41 )
AND post_status = ‘publish’
ORDER BY wpost.post_date DESC
LIMIT 0,10″ );
foreach ($result as $post) {
setup_postdata($post);
$postid = $post->ID;
$title = $post->post_title;
$post_content = $post->post_content;

?>
<li><?php echo $post_content ?></li>
<?php } ?>
</ul>

If you want to style the post content ex. the link you need to go back to step 6: “Custom Fields 1″ and modify this:

<p><a href="%%VALUE%%" target="_blank"><?php echo $link_title ?></a></p>

9. Changing the Query Posts plugin (only needed if you use it!)

Now this is where it gets a bit ugly. I could have found a better way but I don’t have to use the plugin for other things at the moment. Open the following file for editing (on the server or locally….if locally you need to upload it afterwards):

/wp-content/plugins/query-posts/query-posts.php

To add the Add and RSS buttons insert the following line of code on line 180. Update the [...] as needed.

<div id="userLinkMenu"><a href="http://[your domain]/submit-user-link">
<img src="http://www.tripwiremagazine.com/wp-content/themes/[theme name]/images/[add image]" />Submit</a>
<a href="http://[your domain]/category/user-news/feed">
<img src="http://www.tripwiremagazine.com/wp-content/themes/[theme name]/images/[rss image]" />RSS</a></div>

You need some images if you want to use the code as it is. If you just want text links remove the img tag.

<div id="userLinkMenu"><a href="http://www.tripwiremagazine.com/submit-user-link"><img src="http://cdn.tripwiremagazine.com/wp-content/themes/freshnews/images/add.png" />Submit</a><a href="http://www.tripwiremagazine.com/user-links"><img src="http://cdn.tripwiremagazine.com/wp-content/themes/freshnews/images/link-page.png" />More Links</a><a href="http://www.tripwiremagazine.com/category/user-news/feed"><img src="http://cdn.tripwiremagazine.com/wp-content/themes/freshnews/images/ico-rss.gif" />RSS</a></div>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<div <?php if ( function_exists( 'post_class' ) ) post_class(); else echo 'class="post"'; ?>>

<?php if ( function_exists( 'get_the_image' ) && $thumbnail ) : ?>
  <?php get_the_image( array( 'custom_key' => array( 'Thumbnail', 'thumbnail' ), 'default_size' => 'thumbnail' ) ); ?>
  <?php endif; ?>
  <!-- comment this part out to leave out title in user link presentation
    <?php the_title( '<h2><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>' ); ?>
    <p>
      <?php printf( __('<span>By</span> %1$s <span>on</span> %2$s', 'query-posts'), '<span><a href="' . get_author_posts_url( get_the_author_ID() ) . '" title="' . get_the_author() . '">' . get_the_author() . '</a></span>', '<abbr title="' . sprintf( get_the_time( __('l, F jS, Y, g:i a', 'query-posts') ) ) . '">' . sprintf( get_the_time( __('F j, Y', 'query-posts') ) ) . '</abbr>' ); ?>
      <?php edit_post_link( __('Edit', 'query-posts'), ' <span>|</span> <span>', '</span> ' ); ?>
    </p>
    -->
    <?php if ( $display == 'the_content' ) : ?>

    <div>
      <?php the_content( __('Continue reading', 'query-posts') . ' ' . the_title( '"', '"', false ) ); ?>
      <?php wp_link_pages( array( 'before' => '<p>' . __('Pages:', 'query-posts'), 'after' => '</p>' ) ); ?>
    </div>

    <?php else : ?>

    <div>
      <?php the_excerpt(); ?>
    </div>

    <?php endif; ?>
    <!-- comment this part out to leave out post meta in user link presentation
    <p>
      <span><span><?php _e('Posted in', 'query-posts'); ?></span> <?php the_category( ', ' ); ?></span>
      <?php the_tags( '<span> <span>|</span> <span>' . __('Tagged', 'query-posts') . '</span> ', ', ', '</span>' ); ?>
      <?php if ( comments_open() ) : ?><span>|</span><?php endif; ?> <?php comments_popup_link( __('Leave a response', 'query-posts'), __('1 Response', 'query-posts'), __('% Responses', 'query-posts'), 'comments-link', false ); ?>
    </p>
    -->
  </div>
  <div style="border-bottom:1px solid #F1F1ED; padding-bottom:3px; padding-top:2px;"></div>
  <?php endwhile; endif; ?>
<?php endif;

In order to make the list of Link only show the post content containing the title og the link and the description and exclude fx. the realt title of the posts some lines of code in the file have to be either deleted or commented out. I recommend commenting them out so for. The blocks below start at around line 195.

Save the file and make sure it is updated on the server. Check how it looks. This is the sidebar at tripwire magazine:

10. Exclude the User News Category from Menus, front page and RSS feed.

I don’t think that You dont want the User Link menu and the User Link posts to appear on your front page or in your RSS feed. This part is really quite dependant on the theme you are using and how you set up your blog. I’m giving a few hints but don’t expect this part to be fully covered here.

1) The feed part is very simple if you’re using feedburner and the feedburner plugin that redirects all feed requests to feedburner.com. Just add ?cat=-[catid] to feed URL provided to feedburner

When it comes filtering what is shown on the to the frontpage or what Categoties that are shown in menus and widgets I will advise you to look for descriptions and tutorials that cover this as its main focus. There are manu good resource for this that you can use.

11. Creating a Community Link page

Once people start adding community links to your site it makes sense to show more than the 10 latest. In my case if I approve 30 submissions at a time most of them will never be visible in the sidebar. I have found a useful plugin that can show content of a category on a WordPress page – it’s called List Category Posts. Once you have installed it you can create a page and include the following code (have to write catlist and not cat-list. I could not write catlist as it would have printed 200 posts! ) to make it list a specified number of posts from a category. Ability to limit is important as you may get thousands of submissions over time.

[cat-list id=41 numberposts=200] // NB! change cat-list with catlist on your page! //

Because We don’t want the post title in WordPress to be shown (as it contains [user link:...]) and have added the link to the content we have to modify the plugin a bit to make things work as we want…! You have to locate “list_cat_posts.php” in the folder “list-category-posts” (under wp-content/plugins). Then goto line 66 and replace the entire foreach section. Basically I have commented out a few lines and use single->post_content to insert the post content.

foreach($catposts as $single):
	//Template idea by Verex
	if($lcpTemplate){
		require($tplFileName);
	} else {
		//$output .= '<li><a href="' . get_permalink($single->ID).'">' . $single->post_title . '</a>';
		if($atts['date']=='yes'){
			$output .=  ' - ' . get_the_time($atts['dateformat'], $single);//by Verex, great idea!
		}
		if($atts['author']=='yes'){
			$lcp_userdata = get_userdata($single->post_author);
			$output.=" - ".$lcp_userdata->user_nicename . '<br/>';
		}
		//if($atts['excerpt']=='yes' && ($single->post_excerpt)){
			$output .= "<p>$single->post_content</p>";
		//}
		$output.="</li>";
	}
endforeach;

The result will look like this:

Please leave a comment if you find this tutorial useful or if you try it out and run into trouble!

Hold on! Do you have a Facebook page? With one of the good looking Facebook Skins you social profile and presence will improve. Have a look! If you’re looking for nice Cute Tumblr Themes there is a lot of good one to choose from.

<?php
/* Using value put into Custom Field 3 called  LINKTITLE to insert custom title on post to make it stand out in the WordPress Posts view. */$link_title = get_post_meta($post_id, ‘LINKTITLE’, true);

if($link_title != false) {
$post_title = ‘[User Link:'.$link_title.']‘;
} else {
$post_title = ‘[no link title set]‘;
}
$postdata = array(
“ID” => $post_id,
“post_title” => $post_title);
sanitize_post($postdata,”db”);
wp_update_post($postdata);
?>

{ 45 comments… read them below or add one }

compares voting to losing virginity August 10, 2013 at 8:40 am

Hi! I’ve been reading your website for a while now and finally got the bravery to go ahead and give you a shout out from Dallas Texas! Just wanted to tell you keep up the excellent job!

Reply

Watch The Good Wife Season 4 Episode 2 And The Law Won October 9, 2012 at 10:24 am

Сan I sіmply say what a rеliеf
to find somebody that actually undеrstands what
they’re talking about on the net. You definitely know how to bring an issue to light and make it important. More people ought to look at this and understand this side of the story. I was surprised you’re not more populаr givеn that yоu mοst certainly have thе gift.

Reply

annesofie October 9, 2012 at 3:26 pm

Thank you for your kind comment. We always appreciate feed back.

Best regards, Sofie

Reply

carlos July 27, 2011 at 2:05 am

Can´t see the steps for custom fields, please I need the image.

Thanks in advance.

Reply

carlos July 26, 2011 at 5:06 pm

I can´t see the configuration for custom field nº1 just this: [nggallery id=9]

Thanks in advance!

Reply

ador June 30, 2011 at 10:01 pm

thank you for help your article is good please keep up to date with this ……………

Reply

cheap custom jerseys May 19, 2011 at 10:26 am

Build an Awesome Community News Feature for Your WordPress Blog

Reply

Mars March 29, 2011 at 9:30 am

I cannot find the code in list_cat_posts.php that supposed to change

Reply

CCDA resources March 15, 2011 at 8:07 am

You’re lovely! You are very generous to share with us all the coding. I really appreciate it!

Reply

Why Country Sucks December 30, 2010 at 4:24 pm

Thanks for all the coding you showed. This will definitely help me in adjusting my TDO mini form.

Reply

Healthcare Blogger admin November 21, 2010 at 9:20 am

Ok I have tried all thes things I have seen on here specifically this one PSDBOX about replacing the word quote with actual ” and I also tried fgaeg suggestion about replacing code and am still getting the my post titles showing at the date at time and the link preview shows [No Link Title]….
What am I doing wrong???

Reply

Australian Iphne Apps August 24, 2010 at 11:12 am

Thanks for the nice post!

Reply

Jennifer R June 22, 2010 at 11:56 am

It’s too complicated since you can use the FLV community Wordpress plugin.

Reply

fgaeg June 11, 2010 at 11:09 am

Hi Tripwire Mag, i just fix my “little” problem with your code when post title showing 10-06-10(4:20:27) not the “title post”. I replace your code

$postdata = array(
“ID” => $post_id,
“post_title” => $post_title);
sanitize_post($postdata,"db");
wp_update_post($postdata);

into this code below

// Update post
$postdata = array();
$postdata['ID'] = $post_id;
$postdata['post_title'] = $post_title;

// Update the post into the database
wp_update_post( $postdata );

And everything is done, but am I doing right way..? I haven’t any idea that the function of sanitize_post do for WP?

Ah, how about the thumbnail..? I never had a chance to make it..LOL could you help me..

Thanks

Reply

fgaeg June 11, 2010 at 8:59 am

Wow thanks Tripwire Mag for sharing with us!

But I have some problem with that. When I submitted my link, the title from external source is okay, but the title for single post on my WP looks like this “10-06-10(4:20:27)” why..?? Could you help me to fix this..?

And I have a few question, can I adding/get the image post from external link with that..? so each post have their thumbnails to display.

Thanks Tripwire and for everyone

Reply

PSDBOX June 11, 2010 at 11:01 am

Yes, I had that problem too. The “Append to Post Content 1″ code is wrong.

the ending part whare it says:
$postdata = array(
“ID” => $post_id,
“post_title” => $post_title);
sanitize_post($postdata,"db");
wp_update_post($postdata);
?>

should be:
$postdata = array(
“ID” => $post_id,
“post_title” => $post_title);
sanitize_post($postdata,”db”;);
wp_update_post($postdata);
?>

Just change the &quot with real quotes like this “db”

Reply

Andrei Oprica May 15, 2010 at 1:46 pm

I just tried to make the second part of this tutorial and I can’t get it to work. But I found something that can solve the problem for people like me, that have little php knowledge. I found a widget that does everything tripwire is teaching in this tutorial. Its called “Community links feed”. You can try it, it’s perfect for newbies like me: http://www.cssjockey.com/freebies/community-links-feed-wordpress-plugin

Reply

Andrei Oprica May 11, 2010 at 10:44 pm

This is just awesome. I didn’t try the Query part yet but the basic an most important part works great.

The only problem I had was here; sanitize_post($postdata,"db");
it should be sanitize_post($postdata,”db”;);

See if you can change that part of the code for the “Append to Post Content 1″

That causes the title to appear as the date and time instead of [User link: Title of your post]

Otherwise works great. I’ll implement this on my website. I still have to read the Query part since I don’t really know what is that for.

Thanx a lot, this is reaaaaaaaaly helpful

Reply

Digital Scrapbooking May 11, 2010 at 1:39 am

Thankyou so much for this tutorial!

I’ve got it working here: http://digitalscrapbooking-free.com/add-scrapbook-freebie/ and have included an image upload option with it as well.

The only problem I’m still having to work out is the double posting of thumbnails on the “user submitted” page (http://digitalscrapbooking-free.com/category/freebies-from-members/)when I want to have an image included in the single posts and the listing. I think it’s because I have the automatic thumbnail creation incorporated into my site already, so I’m getting double creation of those.

I need that for the other areas of my site, so I’ll have to figure that out later. I’m transferring the entire site over to Wordpress, so I’ve got other things to focus on first :) If you have any ideas on how to work this out, I’d appreciate the advice.

Have a great week!

Reply

Stevo April 25, 2010 at 2:29 am

Oh don’t worry if you can’t reply to my comment. I think I must’ve messed up somewhere while modifying my website. I’ll just start from scratch again.

Reply

Stevo April 22, 2010 at 12:18 pm

Oh sorry I must’ve took it out before you were able to see it and no I didn’t fix it. I did I follow the tutorial by either pasting into the php code widget or pasting the big code and changing the big code on step 8 and pasted into the sidebar but I get the:

Parse error: syntax error, unexpected T_STRING, expecting T_PAAMAYIM_NEKUDOTAYIM in /home2/looksawe/public_html/wp-content/themes/main/sidebar.php on line 43

And it just removes my whole sidebar. I just updated the site so you can have a look at that.

Reply

Stevo April 20, 2010 at 11:16 am

Hey Tripwire Mag, I’m having problems with following step 8.

I got to the coding yourself part and I have downloaded the plugin. But my problem is where exactly do I place that code? Is it inside?

This is my result –> http://www.looksawesome.net/submit-user-link/ (if you scroll down and see the sidebar, you can see the syntax error).

Reply

tripwire team April 20, 2010 at 10:36 pm

@Stevo, As stated there are two options being covered. 1. using a plugin 2. Coding it from scratch and adding the code to sidebar.php. You should not do both 1. and 2. If you pick 2. you need to add the code to the sidebar in you theme. I don’t see the syntax error and believe that you have already fixed it ?

Reply

Simran April 10, 2010 at 1:22 pm

When I try to submit a post using the form created in this tutorial… The date of the submission becomes the title of the post. Please help me to solve this issue ASAP.

Reply

Simran March 28, 2010 at 8:35 am

When a link is submitted, the post is submitted with submission date as Post title but I want the link title as post title… I want a page like http://designrfix.com/category/news

Can you pls help me out ?

Reply

nahid March 24, 2010 at 2:46 pm

i did not understand step 9. where should i insert the code? and where should i insert the second code in step 9. what is that executable php widget in step 8?should we use that if we used todo mini forms? if i use that my theme would go nuts. please explain and be little clear from step 8.. please

Reply

tripwire team March 24, 2010 at 7:49 pm

@nahid, you need to install the Query Posts plugin to do this as explained in step 1. then locate the following file and update the code as explained:
/wp-content/plugins/query-posts/query-posts.php

Reply

san March 22, 2010 at 11:22 pm

Never mind, I think I solved it thanks to @Scott Madden – I think the website is rendering the symbol ” to the actual word .quote. so after changing that in the apend to post, it was fine.

Reply

san March 22, 2010 at 9:46 pm

Hi thanks for the tutorial, I kind of got it to work except the title of the post shows the date and time which it was published not the title I entered. Was this tutorial intend to post that way since the demo you show did not.

Reply

Jim March 19, 2010 at 6:38 pm

Thanks, great post

Reply

sriganesh January 12, 2010 at 6:15 pm

thanks for the tutorial , when i created the form and done adding links , t show in the post , i need to show this in the submit page as you did. and in the sidebar. if i allowed it , it will ruin my homepage and displaying the current community list. regularly i am getting 10-15 link submission ,and i use now fv community link. can you help in this | i need to use this as your

Reply

Scott Madden December 14, 2009 at 1:44 am

@tripwiremag
I figured out what the problem was above in your post ware you have “Add the following code to “Append to Post Content 1?.” For the function call sanitize_post you have:
sanitize_post($postdata,"db");
It should be:
sanitize_post($postdata,”db”);
with the quotation marks on each side of db instead of " on each side.

Thank you for your prompt responses to my questions and keep up the good work.

Reply

Scott Madden December 13, 2009 at 4:01 am

@tripwiremag

No I haven’t touched it I think you may be looking at the Community News page which works fine. What i am having problem with is on the single post page you can check out what I’m getting at this link http://ldfeeds.com/community_news/11-12-09131353/
verses what your getting at this link http://www.tripwiremagazine.com/2009/12/user-linkdo-you-really-want-your-site-on-page-one-of-google.html

Reply

tripwiremag December 13, 2009 at 8:27 am

@Scott, OK see what you mean. Users will never access this page and see this but it is not right. It believe it should be [userlink: ]. How does it look in the edit posts list within WP admin? Is the post title a date ?

Reply

Scott Madden December 13, 2009 at 3:31 am

No I havent touched it I think you may have looked at the Community News page http://ldfeeds.com/community-news/

you can check it out what im talking about (the post title) at these links:
the single post
http://ldfeeds.com/community_news/11-12-09131353/
and here under the Category tag
http://ldfeeds.com/category/community_news/
and in the search results
http://ldfeeds.com/?s=How+to+Make+a+Control+Panel+for+Your+WordPress+Theme

your single post page looks like this
http://www.tripwiremagazine.com/2009/12/user-linkdo-you-really-want-your-site-on-page-one-of-google.html

Hopefully that explanes it better

Reply

tripwiremag December 13, 2009 at 8:41 am

@scott, I would exclude userlinks from any category list, front page, search and the rss feed. I’ll consider if there is a more elegant solution but in meantime you can exclude userlinks by inserting. In the WP loop it will simply jump over the userlink posts.


… // code rendering lists of posts

Reply

Scott Madden December 13, 2009 at 12:58 am

@tripwiremag I followed your instructions and it is up and runing on our site though there is one problem rather than using the LINKTITLE as the post title it appears showing the post title as date and time, in format dd-mm-yyyy(hh:mm:ss).

Any ideas?

Reply

tripwiremag December 13, 2009 at 1:24 am

@Scott, I just visited your site and it seams to work now – did your fix it?

Reply

viettel adsl December 4, 2009 at 6:25 am

A Community News Feature should be need more things than a form :)

Reply

PelFusion December 3, 2009 at 3:56 pm

nice tutorial

Reply

Mark December 3, 2009 at 2:56 pm

Great tutorial! :)

@Chakib

Latest version of TDOMF 0.3.7 should solve that problem.

@Tad Chef

Akismet is the insufficient part here. It’s Akismet thats not identifying spam. The only way Akismet will get better is to tell it. I’m not sure how TDOMF is *meant* to solve it. Have you tried using the Recapatcha or Capatcha widgets in TDOMF as well?

Reply

Tad Chef December 2, 2009 at 7:23 pm

I’ve tried TDO Mini Forms already and it’s to complex for such a simple task. Also it gets bombarded by spam from day one and its Akismet integration is not sufficient. I still have to delete spam submissions by the tens. I deleted false positives (real submissions) in the process already.

Reply

Chakib December 2, 2009 at 5:16 pm

i installed the plug in but whe i went to theoptions page its shows me this error “Warning: substr() expects parameter 2 to be long, string given in C:\xampp\htdocs\wordpress\wp-content\plugins\tdo-mini-forms\admin\tdomf-options.php on line 118

how to deal with that !!!!!!!!

Reply

Scott Madden December 1, 2009 at 11:57 pm

This is right on time I have been looking for a way to put a community links feature on Live Dev Feeds http://ldfeeds.com since I started the site. I really appreciate that you provided all of the necessary code it’s going to save me a bunch of headaches.

Just to let you know I have included a link to this article in the Tutorials section on the sidebar of Live Dev Feeds.

Thanks

Reply

tripwiremag December 2, 2009 at 6:47 am

@Scott, great that you can use it! And thanks for the link.

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

{ 15 trackbacks }

Previous post:

Next post:


Web Analytics