David Sawyer (davesawyer) wrote in component_help,
David Sawyer
davesawyer
component_help

removing bad images

I've edited my summary on my friends page using one of the tutorials and managed to include the user pics. They look pretty cool, except when one of the entries is syndicated and you get that ugly white box with the red x. Is there a way to either place a generic image when syndicateds come up or just not show a userpic when they come up? The code looks like this:

 

<code>
# On the Friends page print: &lt;poster_name&gt; : &lt;journal_name&gt; : &lt;security_icon&gt; &lt;subject&gt; [+&lt;comment_count&gt;]<br />
&#160;&#160;&#160;&#160;&#160;&#160;if ($.view=="friends") {<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; """&lt;center&gt;&lt;img src="$e.userpic.url"&gt;&lt;/center&gt;""";<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; """$e.poster """;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($e.journal.username!=$e.poster.username) { """: $e.journal : """; }<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (defined $e.security_icon) { """$e.security_icon """; }<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; """&lt;a href="#$e.journal.username$e.itemid"&gt;$subject&lt;/a&gt;""";<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($e.comments.count&gt;0) { """ &lt;a href="$e.comments.read_url"&gt;($e.comments.count)&lt;/a&gt;"""; }
</code>

Is there some kind of variable for syndicateds I could throw in there?

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 4 comments