This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Submitted story mods


avatar
Rushian 0
From: -
Submitted story mods

I'm getting a lot of spam being submitted to my "submit story" queue lately.

Two things that would be helpful would be to show the IP on the overview screen (hmm, that could probably already be done if I knew the right $var to print, and where to add it) so I could start banning.(lol, maybe even a 'ban' link too)

Also, a [delete] link from the "Add news X" screen would also be helpful so I could just delete the junk while editing/previewing it.

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Submitted story mods
avatar
OP 0
From: -
Submitted story mods

Worked like a charm! Thanks!

I hope these will be included into 2.x too. Smiling Face
1 Re: Submitted story mods
avatar
Administrator
1340
From: Vienna, Austria
Submitted story mods

Two things that would be helpful would be to show the IP on the overview screen (hmm, that could probably already be done if I knew the right $var to print, and where to add it) so I could start banning.(lol, maybe even a 'ban' link too)

Open cadmin/index.php and replace:

   if ($admin[user_cannews] == 1)

{
$result = DBQuery("SELECT storyq_website, storyq_title, storyq_id FROM esselbach_st_storyqueue ORDER BY storyq_id DESC LIMIT 5");

if (mysql_num_rows($result))
{
TblHeader("$words[SSI]","$words[L5S] $words[IQ] <a href="https://www.contentteller.com/index.php?action=removenqueue"><img src="../images/delete.png" border="0" alt="$words[DSFNQ]"></a>");
while(list($storyq_website, $storyq_title, $storyq_id) = mysql_fetch_row($result))
{
$storyq_title = htmlspecialchars(ScriptEx($storyq_title));
TblMiddle("$storyq_id / $storyq_website","$storyq_title","newsqueue&opts=addqstory-$storyq_id","newsqueue&opts=deleteqstory-$storyq_id");
}
MkTabFooter();
}
}

with:

   if ($admin[user_cannews] == 1)

{
$result = DBQuery("SELECT storyq_website, storyq_title, storyq_id, storyq_authorip FROM esselbach_st_storyqueue ORDER BY storyq_id DESC LIMIT 5");

if (mysql_num_rows($result))
{
TblHeader("$words[SSI]","$words[L5S] $words[IQ] <a href="https://www.contentteller.com/index.php?action=removenqueue"><img src="../images/delete.png" border="0" alt="$words[DSFNQ]"></a>");
while(list($storyq_website, $storyq_title, $storyq_id, $storyq_ip) = mysql_fetch_row($result))
{
$storyq_title = htmlspecialchars(ScriptEx($storyq_title));
$storyq_ip = htmlspecialchars($storyq_ip);
TblMiddle("$storyq_id / $storyq_website","$storyq_title (IP: $storyq_ip)","newsqueue&opts=addqstory-$storyq_id","newsqueue&opts=deleteqstory-$storyq_id");
}
MkTabFooter();
}
}

Then open cadmin/mod_news.php and replace:

        $result = DBQuery("SELECT storyq_website, storyq_title, storyq_id FROM esselbach_st_storyqueue ORDER BY storyq_id DESC LIMIT 100");


while (list($storyq_website, $storyq_title, $storyq_id) = mysql_fetch_row($result))
{
$storyq_title = htmlentities(ScriptEx($storyq_title));
TblMiddle("$storyq_id / $storyq_website", "$storyq_title", "newsqueue&opts=addqstory-$storyq_id", "newsqueue&opts=deleteqstory-$storyq_id");
}

with:

        $result = DBQuery("SELECT storyq_website, storyq_title, storyq_id, storyq_authorip FROM esselbach_st_storyqueue ORDER BY storyq_id DESC LIMIT 100");


while (list($storyq_website, $storyq_title, $storyq_id, $storyq_ip) = mysql_fetch_row($result))
{
$storyq_title = htmlentities(ScriptEx($storyq_title));
$storyq_ip = htmlspecialchars($storyq_ip);
TblMiddle("$storyq_id / $storyq_website", "$storyq_title (IP: $storyq_ip)", "newsqueue&opts=addqstory-$storyq_id", "newsqueue&opts=deleteqstory-$storyq_id");
}


Also, a [delete] link from the "Add news X" screen would also be helpful so I could just delete the junk while editing/previewing it.

This is another modification in cadmin/mod_news.php.

Find:
            echo "<tr><td><font size="2" face="Verdana, Arial">$words[SMY]</font></td><td></td><td><font face="Arial" size="2">$story[storyq_author] $amail ($words[TIP] $story[storyq_authorip]) $story[storyq_time]</font></td></tr>";

and replace with:

            echo "<tr><td><font size="2" face="Verdana, Arial">$words[SMY]</font></td><td></td><td><font face="Arial" size="2">$story[storyq_author] $amail ($words[TIP] $story[storyq_authorip]) $story[storyq_time]  [<a href="https://www.contentteller.com/index.php?action=newsqueue&opts=deleteqstory-$story[storyq_id]">Delete this submission</a>]</font></td></tr>";

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.