Guests can add news

Download plugins, language packs and stuff.

Postby Ramon » Sun Apr 01, 2007 9:44 pm

Hmm somehow when a guest sends in a story, it is without the need of approval posted on the website?



In the admin panel it says (unapproved), but it still shows up. When I log out i'm still able to see the article on the website, any ideas what might cause that?



I use this include code



Code: Select all

if ($do == 'register') {

  echo regForm('default');

}



else {

   $number = "1";

   $category = "1,2,3,6,7,8,9,10,11";



   include 'cms/show_news.php';

}

Image
Ramon
 
Posts: 599
Joined: Wed Oct 12, 2005 8:51 pm
Location: Hoogeveen, NL

Postby scottdallas » Mon Apr 02, 2007 1:29 pm

It did that to me too til I cleared my history and cache on my browser to ensure I was logged out. Can I see where it's doing this to you cause I'll test the link and see if I can see the articles then you'll know for sure if it's showing up for other people.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby Ramon » Mon Apr 02, 2007 2:38 pm

Image
Ramon
 
Posts: 599
Joined: Wed Oct 12, 2005 8:51 pm
Location: Hoogeveen, NL

Postby FI-DD » Mon Apr 02, 2007 3:37 pm

In guest.php change this:

Code: Select all
'hidden'   => true




to this:

Code: Select all
'hidden'   => 1




In inc/show.news.php change this:

Code: Select all
   if (!$is_logged_in or $is_logged_in and $member['level'] == 4){

      $where[] = 'hidden = 0';

      $where[] = 'and';

   }




to this:

Code: Select all
   //if (!$is_logged_in or $is_logged_in and $member['level'] == 4){

      $where[] = 'hidden = 0';

      $where[] = 'and';

   //}
Last edited by FI-DD on Mon Apr 02, 2007 6:04 pm, edited 2 times in total.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby scottdallas » Mon Apr 02, 2007 5:24 pm

If you make the change FI-DD just wrote it will make it so people can submit things to your site with no approval.. they go live immediately. I don't think that's what you're looking for is it?
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby Ramon » Mon Apr 02, 2007 5:27 pm

You got it right scott ;)



That's what i'm trying to avoid FI-DD :P
Image
Ramon
 
Posts: 599
Joined: Wed Oct 12, 2005 8:51 pm
Location: Hoogeveen, NL

Postby FI-DD » Mon Apr 02, 2007 6:05 pm

I edited my post.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Ramon » Mon Apr 02, 2007 6:30 pm

Doesn't make a difference :(
Image
Ramon
 
Posts: 599
Joined: Wed Oct 12, 2005 8:51 pm
Location: Hoogeveen, NL

Postby FI-DD » Mon Apr 02, 2007 6:47 pm

Check the post in your database using phpmyadmin. What's the value for "hidden"?



And please attach your show.news.php file.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Ramon » Tue Apr 03, 2007 12:02 am

Can't reach the mysql database atm, but in the admin panel it says (unnaproved) behind the message's which should'nt be on the website.
Image
Ramon
 
Posts: 599
Joined: Wed Oct 12, 2005 8:51 pm
Location: Hoogeveen, NL

Postby FI-DD » Tue Apr 03, 2007 12:09 am

Very strange. What happens when you use just a plain include code - without any category or number variables.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Ramon » Tue Apr 03, 2007 12:14 am

Hmm.. Then it works :S



http://www.worldracing.nl/test.php

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



<?PHP

include_once 'cms/head.php';

?>



<html>



<head>

<title>Worldracing.nl</title>

</head>



<body>



<?PHP

   include 'cms/show_news.php';

?>



</body>



</html>





http://www.worldracing.nl/

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



<?PHP

include_once 'cms/head.php';



ob_start();

?>



<html>



<head>



<title>Worldracing.nl</title>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">

<link href="/style.css" type="text/css" rel="styleSheet">

<!--[if IE]>

<link rel="stylesheet" type="text/css" href="/styleIE.css">

<![endif]-->

<link rel="alternate" type="application/rss+xml" title="Laatste nieuwsberichten op Worldracing" href="http://www.worldracing.nl/rss.xml">

<script type="text/javascript" src="/inc/js/countdown.js"></script>

<script type="text/javascript" src="/inc/js/menu.js"></script>



</head>



<body>

<div id="wrapper">



<div id="header"><a href="/"></a></div>



<?PHP

   include('inc/menu.php');

?>



<div id="inhoud">



<div id="inhoudlinks">



<?PHP

if ($do == 'register') {

  echo regForm('default');

}



else {

   $number = "1";

   $category = "2,3,6,7,8,9,10,11";



   include 'cms/show_news.php';

?>

<br />

<?



   include 'inc/klassement.php';



?>





<div id="headlines">

<h1>Headlines</h1>

<ul>

<?PHP

$static['number'] = "12";

$static['category'] = "1,2,3,6,7,8,9,10,11";

$static['template'] = "headlines";

$static['skip'] = "1";



include 'cms/show_news.php';

?>

</ul>

</div>





<?PHP

}

?>



</div>



<div id="inhoudrechts">



<?PHP

   include('inc/login.php');

?>



<?PHP

   include('inc/countdown.php');

?>





<?PHP

   include('inc/volgenderace.php');

?>



<?PHP

   include('inc/2007/f1teampresentatie.php');

?>





<?PHP

include('inc/2007/f1kalender.php');

?>



<?PHP

   include('inc/poll.php');

?>



</div>





<div id="clearfooter">

</div>



<?PHP

   include('inc/footer.php');

?>



</div>



</div>



</body>



</html>

Image
Ramon
 
Posts: 599
Joined: Wed Oct 12, 2005 8:51 pm
Location: Hoogeveen, NL

Postby FI-DD » Tue Apr 03, 2007 12:17 am

You know what to do then, don't you? :wink:



Add the other stuff and see what breaks it.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Ramon » Tue Apr 03, 2007 12:22 am

Already busy on it :P



Edit:

When adding the $category propertie it breaks..

Code: Select all
$category = "2,3,6,7,8,9,10,11";




Also making it $static did'nt help to problem :(

Code: Select all
$static['category'] = "2,3,6,7,8,9,10,11";
Image
Ramon
 
Posts: 599
Joined: Wed Oct 12, 2005 8:51 pm
Location: Hoogeveen, NL

Postby hetes » Sat Apr 28, 2007 3:32 pm

I want to use captcha but if i set "true" $use_captcha in guest.php, i get a blank page. If i set "false", it works correctly...

$path_to_captcha is correct, so i don't know what's the problem... :roll:



And how can i add an email form?
User avatar
hetes
 
Posts: 36
Joined: Tue Apr 17, 2007 4:33 pm
Location: Hungary

PreviousNext

Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests