Page 1 of 1

why no one never helps me ? :(((((

Posted: Sun Oct 19, 2003 1:24 am
by McLR
Hi
I need very urgent this mod "users can't quote first post"
and script that right click won't work
tnx all

Posted: Sun Oct 19, 2003 10:24 am
by McLR
why no one never helps me ? :(((((

Posted: Sun Oct 19, 2003 2:03 pm
by drathbun
If you search, you'll find any number of options for the right-click prevention. None of which are foolproof. As to your other "issue", you posted on a Saturday. You think maybe it will take a few days for someone to see your mod, get interested, and see about helping you out? Have you tried writing it yourself? :roll:

First, you will have to add topic_first_post_id to the SQL that retrieves the information for viewtopic.php. Then in the logic that displays the quote button, check to see if the "current" post id is the same as the topic_first_post_id. If it is, then don't display the quote button.

The SQL to retrieve the topic info is at the top of viewtopic.php. The quote button looks something like this:

Code: Select all

        $temp_url = append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
        $quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" hspace="2" border="0" /></a>';
        $quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';
You would replace that with something like this:

Code: Select all

if ($topic_first_post_id == $postrow[$i]['post_id])
{
        $quote = '';
        $quote_img = '';
}
else
{
        $temp_url = append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
        $quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" hspace="2" border="0" /></a>';
        $quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';
}
Once you add the topic_first_post_id to the query, assign it to the variable $topic_first_post_id, this should work.

Posted: Sun Oct 19, 2003 4:59 pm
by McLR
hi
tnx for reply :D
but I not so good in sql and php , so i don't know how to put the query in sql...
and...
I replased this :

Code: Select all

	$temp_url = append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
	$quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" border="0" /></a>';
	$quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';
with this :

Code: Select all

if ($topic_first_post_id == $postrow[$i]['post_id]) 
{ 
        $quote = ''; 
        $quote_img = ''; 
} 
else 
{ 
        $temp_url = append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']); 
        $quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" hspace="2" border="0" /></a>'; 
        $quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>'; 
} 
 
it wrote :

Code: Select all

Parse error: parse error, expecting `']'' in /XXXXXX/www/test/viewtopic.php on line 986

the line 986 is :

Code: Select all

$quote_img = ''; 
but i see no errors here :?
so explain me plz how to make it work , plz