Delete quote

Discussion forum for MOD Writers regarding MOD Development.
Locked
Primy
Registered User
Posts: 109
Joined: Sat Dec 01, 2007 5:11 pm

Delete quote

Post by Primy »

Hi anyone

I'm trying to understand how bbcodes work... but some things remain a mystery for me.

For example, how may i delete the quote function? If i want that users don't get anymore quote bbcode in posting.php, what have i change?

I guest the changes wold concern posting.php, message_parser.php and bbcode.php...but even if i delete any function linked to quote i get this bbcode any time.

Advises?
User avatar
Elitzur
I've Been Banned!
Posts: 323
Joined: Sat Sep 15, 2007 7:49 am
Location: Europe, UK.
Contact:

Re: Delete quote

Post by Elitzur »

Find this:

Code: Select all

<!-- IF postrow.U_QUOTE --><li class="quote-icon"><a href="{postrow.U_QUOTE}" title="{L_REPLY_WITH_QUOTE}"><span>{L_REPLY_WITH_QUOTE}</span></a></li><!-- ENDIF -->
And replace it with this:

Code: Select all

<!-- IF postrow.U_QUOTE and U_ACP --><li class="quote-icon"><a href="{postrow.U_QUOTE}" title="{L_REPLY_WITH_QUOTE}"><span>{L_REPLY_WITH_QUOTE}</span></a></li><!-- ENDIF -->
That will make it only available to Admins, replace the "ACP" with "MCP" to make it moderators and admins.
Primy
Registered User
Posts: 109
Joined: Sat Dec 01, 2007 5:11 pm

Re: Delete quote

Post by Primy »

Thanks for the answer Elit ;)

This is a good solution for small changes, but i need to know how disable quote function just in some cases, by adding conditions in posting.php.

It's strange that i dont find the right codes to make that... I think dat a code like this is needed:

preg_replace("/\[quote...some codes);

but i don't know how bbcode works......
User avatar
Elitzur
I've Been Banned!
Posts: 323
Joined: Sat Sep 15, 2007 7:49 am
Location: Europe, UK.
Contact:

Re: Delete quote

Post by Elitzur »

By removing the Quote BBCode button wont remove the Quote image button, but I know what you need ;)

Open: styles/prosilver/templates/viewtopic_body.html
Find and Remove:

Code: Select all

<!-- IF postrow.U_QUOTE --><li class="quote-icon"><a href="{postrow.U_QUOTE}" title="{L_REPLY_WITH_QUOTE}"><span>{L_REPLY_WITH_QUOTE}</span></a></li><!-- ENDIF -->
Open: styles/prosilver/templates/posting_buttons.html
Find and Remove:

Code: Select all

	<!-- IF S_BBCODE_QUOTE -->
		<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
	<!-- ENDIF -->
That should do the trick :)
glassdmg
Registered User
Posts: 12
Joined: Sun Jun 07, 2009 5:12 pm

Re: Delete quote

Post by glassdmg »

Cool, Thanks
Locked

Return to “[3.0.x] MOD Writers Discussion”