Novice@PHP
Members-
Posts
39 -
Joined
-
Last visited
Profile Information
-
Gender
Not Telling
Novice@PHP's Achievements
Member (2/5)
0
Reputation
-
A script that will allow writers to claim article titles?
Novice@PHP replied to Novice@PHP's topic in Third Party Scripts
Wew I don't want to build it. No time for that. I guess something already exists, I just don't know what to look for. Thanks for the detailed reply though. -
I have a website but managing writers is HARD. I need a project management script that assigns articles to a list, that the writers then claim from and submit. I have no idea what kind of script I'm looking for. Quick process: 1. Add a bunch of article titles across a number of categories. 2. Registered writers can claim which titles they want to write but are only allowed to claim in their own topic. 3. Writers write articles, mark as done and submit for review. No idea what to look for but any help hugely appreciated. Thanks.
-
Passing Custom Field Into Wordpress Query_Posts Array?
Novice@PHP replied to Novice@PHP's topic in Applications
I don't know what you mean. I tried just putting $listids without the echo and it didn't work. is it fast turnaround and able to deal with small snippets like this? -
Passing Custom Field Into Wordpress Query_Posts Array?
Novice@PHP replied to Novice@PHP's topic in Applications
I'm trying to put the value of the custom field into the array 'include' which is a series of post IDs. The biggest issue is I didn't make all of the query, just some of it. The Post IDs part I made but need those IDs to be passed from a custom field. Thanks for your help, hopefully someone can help. Other than that is there somewhere where I can pay for quick help with small snippets like this? I don't like to be a vampire. -
Passing Custom Field Into Wordpress Query_Posts Array?
Novice@PHP replied to Novice@PHP's topic in Applications
The query above queries posts on a page that already has a post. It's basically a query to query posts inside posts. So I need to pass the post IDS into the include array using custom fields. But No idea how to do it other than what I've got below. Thanks <?php /* Template Name Posts: List More Posts */ ?> <?php get_header(); ?> <!-- BEGIN COL LEFT --> <div id="colLeft"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="postItem"> <!-- google_ad_section_start --> <h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1> <div class="categs"><?php the_category(', ') ?></div> <div class="meta"> <div>Last Edited: <?php the_time('M j, Y') ?></div> <div class="icoAuthor">Expert Author: <?php the_author_link(); ?></div> <div class="icoComments"><?php comments_popup_link('No Comments', '1 Comment ', '% Comments'); ?></div> </div> <?php &listids = get_post_meta($post->ID, 'list_array', true); $query_args = array('post_type'=>'post', 'post_status'=>'publish', 'include' => 'echo $listids;', 'orderby' => 'date', 'order' => 'ASC'); $query_posts = get_posts($query_args); $last_query = end($query_posts); foreach ($query_posts as $post) : setup_postdata($post); ?> <?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '" style="float:left;margin-bottom:35px;"'); ?><h3><?php echo get_post_meta($post->ID, 'list_number', true); ?>. <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3><?php the_excerpt(45); ?><a href="<?php the_permalink(); ?>" class="more">Read More..</a><div style="clear:both;"></div><hr /> <?php endforeach; ?> <span class='st_facebook_hcount' displayText='Facebook'></span> <span class='st_twitter_hcount' displayText='Tweet'></span> <span class='st_pinterest_hcount' displayText='Pinterest'></span> <span class='st_linkedin_hcount' displayText='LinkedIn'></span> <span class='st_sharethis_hcount' displayText='ShareThis'></span><br /> <?php the_tags('<p class="tags">Tags: ', ', ', '</p>'); ?> <div id="howback">IGNORE THIS</div> <?php comments_template(); ?> <?php endwhile; ?> <?php else : ?> <p>Sorry, but you are looking for something that isn't here.</p> <?php endif; ?> </div> <!-- END COL LEFT --> <?php get_sidebar(); ?> <?php get_footer(); ?> -
I've made a working query to query Wordpress posts by ID but hit a roadblock. I can't pass the custom field value into the post ID array as that is where I will eneter the values to be used in the array. As seen here: listids being the custom field value. <?php &listids = get_post_meta($post->ID, 'list_array', true); $query_args = array('post_type'=>'post', 'post_status'=>'publish', 'include' => 'echo $listids;', 'orderby' => 'date', 'order' => 'ASC'); $query_posts = get_posts($query_args); $last_query = end($query_posts); foreach ($query_posts as $post) : setup_postdata($post); ?>
-
Can anyone elaborate on the guy aboves answer and show an example of elseif using the code above without echoing?
-
I have this code which checks for the word "Big Ben" and if it's not there it outputs some html. I want t be able to make another statement to also check for the word "London Tower" and if it's not there then to check for the word "Canary Wharf", So far I've only managed one statement without the code breaking, how do I add the others in as well. <?php $astacker=get_post_meta($post->ID, 'thesite', true); if ( $astacker == [b]'Big Ben'[/b]) { ?> <?php include(TEMPLATEPATH."/feedsgrabstack.php");?> <?php }else { ?> <div id="splitter"><div class="clear"> <a href="<?php echo get_post_meta($post->ID, "linktosource", true);?>">Click Here To View Answers</a> <span style="float:right;"><a href="#related">See Related Questions</a></div></div> <?php } ?>
-
I've made up some new code but I have an issue with trying to figure out why it won't work. Do you see any issues with it? $rss = fetch_feed('<?php echo get_post_meta($post->ID, "linktosource", true);?>'); Thanks in advance
-
This code has worked fine for months: $ret = @preg_replace('«'.stripslashes($pattern).'«i', $this->current_feed['replace'][$i], $this->postinfo[$postfield]); Then the error was saying that this character '�' found in the code (even in notepad) like this: $ret = @preg_replace(''�'.stripslashes($pattern).''�i', $this->current_feed['replace'][$i], $this->postinfo[$postfield]); (had to leave off php tags to show it properly). So I replaced the broken code with the code that has been working for months, but it still keeps saying that the '� is on that line and casuing an unknown modifier?? Thanks
-
$ret = preg_replace('«'.stripslashes($pattern).'«i', $this->current_feed['replace'][$i], $this->postinfo[$postfield]); Could it have cached the file it is using and is still using an old version with the weird question marks? As it's this same error over and over again even though the weird question marks are not in the code any more?
-
I keep getting an "Unknown modifier" error with this line of code in my script: $ret = @preg_replace('«'.stripslashes($pattern).'«i', $this->current_feed['replace'][$i], $this->postinfo[$postfield]); The error says there is a '�' character but when I check the file there are none of them present in the code, though first time I chekced there were then I removed them but error still occurs. preg_replace() [function.preg-replace]: Unknown modifier '�' Is there a case that it is not refreshing the script and I need to delete and replace? (tried this though) Is there an issue with the initial line of code I've shown? (it has worked for weeks up until I changed memory size scripts are allowed to use). The weird issue is that no matter how many times I change the line to the previously working line - the script will still encounter the issue...? All replies thanked in advance and I'll pop back soon to see any suggestions. Thanks.