<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress support forums Topic: Include code in posts</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Topic: Include code in posts</description>
<language>en</language>
<pubDate>Fri, 29 Aug 2008 07:34:12 +0000</pubDate>

<item>
<title>wittmania on "Include code in posts"</title>
<link>http://bbpress.org/forums/topic/include-code-in-posts#post-7156</link>
<pubDate>Tue, 01 May 2007 17:33:01 +0000</pubDate>
<dc:creator>wittmania</dc:creator>
<guid isPermaLink="false">7156@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Trent uses &#60;code&#62;if (bb_current_user_can(&#38;#39;administrate&#38;#39;))&#60;/code&#62; in his &#60;a href=&#34;http://bbpress.org/forums/topic/923&#34;&#62;YouTube plugin&#60;/a&#62;.  Couldn't you mod the allow_images plugin to also allow &#60;code&#62;&#38;lt;script&#38;gt;&#60;/code&#62; tags, but only if the user is an administrator?  That would still allow the scripts to do their thing, but only in posts authored by an administrator. &#60;/p&#62;
&#60;p&#62;Unfortunately, if you're looking for a way to place ads in posts by any ol' user, there's not a safe way to do that b/c they could put ANY script in and have it execute.&#60;/p&#62;
&#60;p&#62;Best bet?  &#60;a href=&#34;http://bbpress.org/forums/topic/1024?replies=5&#34;&#62;bb-Ads&#60;/a&#62;.  Situations just like this are what I wrote it for.  You can see it in action at &#60;a href=&#34;http://blog.wittmania.com/bbpress&#34;&#62;blog.wittmania.com/bbpress&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "Include code in posts"</title>
<link>http://bbpress.org/forums/topic/include-code-in-posts#post-7155</link>
<pubDate>Tue, 01 May 2007 17:23:21 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">7155@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Yeah, and that's where it's annoying because you can't easily check if a given user has permissions. Might be worth a trac ticket request.&#60;/p&#62;
&#60;p&#62;Possibly easiest would be to attach a filter for the post being submitted, because then you can use the &#60;code&#62;bb_current_user_can()&#60;/code&#62; function.
&#60;/p&#62;</description>
</item>
<item>
<title>Null on "Include code in posts"</title>
<link>http://bbpress.org/forums/topic/include-code-in-posts#post-7154</link>
<pubDate>Tue, 01 May 2007 16:17:58 +0000</pubDate>
<dc:creator>Null</dc:creator>
<guid isPermaLink="false">7154@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Well this doesn't adress ads only, the question is more that the admin have more rights (like javascript/html entries) then 'normal' users.&#60;/p&#62;
&#60;p&#62;Can be done let me think................&#60;/p&#62;
&#60;p&#62;- You'll have to enter some new tags in the plugin (allowed tags)&#60;br /&#62;
- Then in the template files containing post fields, you could add the tags and make them visible for the admin only with something like: if user can edit;&#60;/p&#62;
&#60;p&#62;Now you can use javascript and other tags that you've entered and only the admin can see these links/buttons, but every1 can use them though :(...&#60;/p&#62;
&#60;p&#62;So some filter should be added in view.php? like euuhh...&#60;br /&#62;
&#60;code&#62;If post is by admin, allow tags x,y,z else print as code...&#60;/code&#62;&#60;br /&#62;
This way if a user tries to put in some javascript code it will be displayed as code and if the user is admin it will execute/display it.&#60;/p&#62;
&#60;p&#62;In theory :D
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "Include code in posts"</title>
<link>http://bbpress.org/forums/topic/include-code-in-posts#post-7152</link>
<pubDate>Tue, 01 May 2007 15:53:56 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">7152@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;If you can't edit the template and have something against the excellent &#60;a href=&#34;http://bbpress.org/forums/topic/1024?replies=5&#34;&#62;bb-Ads&#60;/a&#62; plugin: I can't help you, because AFAIK there's no straightforward API function to check what a non-current user can do.
&#60;/p&#62;</description>
</item>
<item>
<title>dprice on "Include code in posts"</title>
<link>http://bbpress.org/forums/topic/include-code-in-posts#post-7150</link>
<pubDate>Tue, 01 May 2007 14:15:37 +0000</pubDate>
<dc:creator>dprice</dc:creator>
<guid isPermaLink="false">7150@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;There is a plugin to allow the img tag, but you'd need to edit it and add a statement in saying &#34;if admin then allowed_tags = ..., else allowed_tags = ...&#34;. I'm not sure how easy that would be - anyone else have any clues?&#60;/p&#62;
&#60;p&#62;I'd suggest editing the template in bb-templates and adding it in manually, if you really, really want a banner ad.
&#60;/p&#62;</description>
</item>
<item>
<title>medden on "Include code in posts"</title>
<link>http://bbpress.org/forums/topic/include-code-in-posts#post-7145</link>
<pubDate>Tue, 01 May 2007 12:12:56 +0000</pubDate>
<dc:creator>medden</dc:creator>
<guid isPermaLink="false">7145@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Is there a simple way for ONLY the administrator of the forum to be able to input embedded javascript into posts?&#60;/p&#62;
&#60;p&#62;She wants to include some banner ads from other companies, and getting these in the right format is turning into a real headache.....&#60;/p&#62;
&#60;p&#62;they are published like this...&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
&#60;a href=&#34;http://track.webgains.com/click.html?wglinkid=2995&#38;#38;wgcampaignid=23815&#34;&#62;&#38;lt;img src=&#34;http://track.webgains.com/link.html?wglinkid=2995&#38;#38;wgcampaignid=23815&#38;#38;js=0&#34;  border=&#34;0&#34;  alt=&#34;&#34;/&#38;gt;&#60;/a&#62;&#60;/code&#62;&#60;br /&#62;
but the image plugin only allows .jpg .gif  etc.&#60;/p&#62;
&#60;p&#62;Could that be disabled only if the ADMIN was posting the entry?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
