1 (edited by 2008-08-23 18:01:21)

Topic: [HACK] show posts from only one user

Name: Filter by Author
Author: NyNe
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: Adds a variable you can use with your CN include code where you can choose from which user post most be shown.
This doesn't work well when used with pagination. A more advanced way can be found in the next post.
Instructions:
open shows.inc.php

find:

if($category and $requested_cats[$news_arr[6]] != TRUE){ continue; }

add above:

if (isset($show_user) && !stristr("|".$news_arr[1]."|", "|".$show_user."|")) { continue; }

in your include add $show_user = "username";
or if you'd like to make it changable by the user $show_user = $_GET['show_user']; then in the url set ?show_user=username