Jump to content

Novice@PHP

Members
  • Posts

    39
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Novice@PHP's Achievements

Member

Member (2/5)

0

Reputation

  1. 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.
  2. 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.
  3. 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?
  4. 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.
  5. 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(); ?>
  6. 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); ?>
  7. Can anyone elaborate on the guy aboves answer and show an example of elseif using the code above without echoing?
  8. 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 } ?>
  9. 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
  10. I'm testing this now, hopefully it works, but what I don't understand is why would it have worked all these months then just stopped? Thanks all, I'll come back after rigorous testing
  11. 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
  12. This worked fine up until an hour ago when the "«" was replaced with '�' and it created the error. I then fixed the line but it still keeps saying that the '�' is causing an "Unknown modifier" even though the '�' doesn't even exist in the code any more... ?
  13. $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?
  14. The weird part is this script worked fine, then where the («) are was replaced with those weird question marks so I replaced with the backed up file but still get those errors saying they still exist when they don't any more? Could the script possibly have cached an old version of the way it runs?
  15. 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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.