<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anshul Sharma</title>
	<atom:link href="http://www.evilgenius.anshulsharma.in/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evilgenius.anshulsharma.in</link>
	<description>An Idea Starts with a Grin ;)</description>
	<lastBuildDate>Thu, 05 Jan 2012 19:44:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to show Post Excerpt along with the Title over thumbnails in CG View</title>
		<link>http://www.evilgenius.anshulsharma.in/cgview/show-post-excerpt-over-thmbnails/</link>
		<comments>http://www.evilgenius.anshulsharma.in/cgview/show-post-excerpt-over-thmbnails/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 19:41:17 +0000</pubDate>
		<dc:creator>Anshul</dc:creator>
				<category><![CDATA[CGView]]></category>

		<guid isPermaLink="false">http://www.evilgenius.anshulsharma.in/?p=286</guid>
		<description><![CDATA[Go to PLUGIN_DIR/category-grid-view-gallery/includes/CatGridView.php To the very bottom of the page, add this function : function my_excerpt($text, $excerpt) { if ($excerpt) return $excerpt; $text = strip_shortcodes( $text ); $text = apply_filters(&#39;the_content&#39;, $text); $text = str_replace(&#39;]]&#62;&#39;, &#39;]]&#38;gt;&#39;, $text); $text = strip_tags($text); $excerpt_length = apply_filters(&#39;excerpt_length&#39;, 55); $excerpt_more = apply_filters(&#39;excerpt_more&#39;, &#39; &#39; . &#39;[...]&#39;); $words = preg_split(&#34;/[\n\r\t ]+/&#34;, $text,]]></description>
			<content:encoded><![CDATA[<ul>
<li>Go to <em>PLUGIN_DIR/category-grid-view-gallery/includes/CatGridView.php</em></li>
<li>To the very bottom of the page, add this function :</li>
</ul>
<pre>function my_excerpt($text, $excerpt)
{
    if ($excerpt) return $excerpt;

    $text = strip_shortcodes( $text );

    $text = apply_filters(&#39;the_content&#39;, $text);
    $text = str_replace(&#39;]]&gt;&#39;, &#39;]]&amp;gt;&#39;, $text);
    $text = strip_tags($text);
    $excerpt_length = apply_filters(&#39;excerpt_length&#39;, 55);
    $excerpt_more = apply_filters(&#39;excerpt_more&#39;, &#39; &#39; . &#39;[...]&#39;);
    $words = preg_split(&quot;/[\n\r\t ]+/&quot;, $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
    if ( count($words) &gt; $excerpt_length ) {
            array_pop($words);
            $text = implode(&#39; &#39;, $words);
            $text = $text . $excerpt_more;
    } else {
            $text = implode(&#39; &#39;, $words);
    }

    return apply_filters(&#39;wp_trim_excerpt&#39;, $text, $raw_excerpt);
}
</pre>
<ul>
<li>Now go to the function <em>cg_get_title</em><em>() (on line 99)</em></li>
</ul>
<p>Replace the whole function with:</p>
<pre>    private function cg_get_title($single){
        global $cg_url;
        $excerpt = my_excerpt($single-&gt;post_content,$single-&gt;post_excerpt);
        if($this-&gt;params[&#39;title&#39;]){
            $title_array = get_post_meta($single-&gt;ID, $this-&gt;params[&#39;title&#39;]);
            $title = $title_array[0];
            if(!$title){$title = $single-&gt;post_title;}
        }
        else { $title = $single-&gt;post_title;}
        $returnlink = ($this-&gt;params[&#39;lightbox&#39;])? (&#39;&quot;&#39;.$cg_url.&#39;/includes/CatGridPost.php?ID=&#39;.$single-&gt;ID.&#39;&quot; class=&quot;cgpost&quot;&#39;) : (&#39;&quot;&#39;.get_permalink($single-&gt;ID)).&#39;&quot;&#39;;
        $cgfontsize=$this-&gt;cg_get_font_size();
        $cgtitle=&#39;&lt;div id=&quot;cgback&quot; class=&quot;cgnojs &#39;.$this-&gt;params[&#39;showtitle&#39;].&#39;&quot;&gt;&lt;/div&gt;&lt;div id=&quot;cgtitle&quot; class=&quot;cgnojs &#39;.$this-&gt;params[&#39;showtitle&#39;].&#39;&quot;&gt;&lt;p style=&quot;font-size:&#39;.$cgfontsize.&#39;px;line-height:&#39;.(1.2*$cgfontsize).&#39;px;&quot;&gt;&lt;a href=&#39;.$returnlink.&#39;&gt;&#39;.$title.&#39;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;p style=&quot;font-size:&#39;.(0.8*$cgfontsize).&#39;px;line-height:&#39;.(1.2*$cgfontsize).&#39;px;&quot;&gt;&#39;.$excerpt.&#39;&lt;/p&gt;&lt;/div&gt;&#39;;
        return $cgtitle;
    }
</pre>
<ul>
<li>Open &quot;<em>PLUGIN_DIR\category-grid-view-gallery\js\cgview.js</em>&quot;</li>
<li>Replace Line 11 and 12 by this:</li>
</ul>
<pre>    $(d[0]).stop(true,true).animate({height: &#39;100%&#39;},200);
    $(d[1]).stop(true,true).animate({height: &#39;95%&#39;},200);
</pre>
<ul>
<li>Open &quot;<em>PLUGIN_DIR\category-grid-view-gallery\css\style.css</em>&quot;</li>
<li>From Line 52 to Line 67,</li>
</ul>
<p>Replace <em>height:35%; </em>by <em>height:100%;</em></p>
<p>and Replace <em>height:32%; </em>by <em>height:95%;</em></p>
<p>&nbsp;</p>
<p>THATS IT ! Your Thumbnails show Post excerpt along with your Title now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evilgenius.anshulsharma.in/cgview/show-post-excerpt-over-thmbnails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

