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

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
McLR
Registered User
Posts: 95
Joined: Thu Aug 21, 2003 12:51 pm

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

Post 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
McLR
Registered User
Posts: 95
Joined: Thu Aug 21, 2003 12:51 pm

Post by McLR »

why no one never helps me ? :(((((
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post 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.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
McLR
Registered User
Posts: 95
Joined: Thu Aug 21, 2003 12:51 pm

Post 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
Post Reply

Return to “[2.0.x] MOD Requests”