XtGem Forum catalog
MYCSSTRAP
The world biggest CSS Trap!!
* Biplob_Mondol
In this version a new thing is i add Read more button or Continue reading button.i saw most users use replacement method with perfect blog style forum update.but it is easyly can be add on Perfect blog based update v1.it is no need more work copy the script and on your site.
img
what need?
to apply this version you need to success in v1.it will answer how to do.
Replace the jquery script from v1 by this.
<div id="load2" style="display: none;"></div>
<script language="javascript">
function tload(l,j){
 $('#load2').load(l+' body',function(tdata){
  tdata=$(tdata).find('.eachmsg').first().html();
  tdata=tdata.split('<article>')[1].split('</article>')[0]; tdata=tdata.replace(/\[img\](.+?)\[\/img\]/ig,''); tdata=tdata.replace(/(\r\n|\n|\r)/gm," "); tdata=tdata.replace(/<br \/>/ig,' '); tdata=tdata.replace(/\[url\](.+?)\[\/url\]/ig,'$1'); tdata=tdata.replace(/\<b\>(.+?)\<\/b\>/ig,'$1'); tdata=tdata.replace(/\[php\](.+?)\[\/php\]/ig,'');
tdata=tdata.substr(0,100);  $('div[name=ftext]:eq('+j+')').html(tdata+'... <div style="display: block;" align="right"> <a href="'+l+'"><span class="more">Read more</span></a></div>');
  })
}

cou = document.getElementsByName('fix').length;
for(j=0;j<cou;j++){
 h = $('div[name=fix]:eq('+j+')').find('a').attr('href');
 tload(h,j);
}
</script>

Copy code


CSS for button
if you want to decorate button put this style on head tag for fast and better effect.
<style type="text/css"> 
.more 
{ background: #62c784;
color: white; 
padding: 4px;
border: 1px #00a764 solid; }
</style>

Copy code

if you want only text not button you can ignor the above css

Demo : ethio-pic.tk

if you have any question comment here

Thank you.
ethio-pic.tk
2015-12-25 23:00 (edited 2015-12-25 23:18 by Biplob_Mondol ) · (0)

Online: Guests: 1
Go to top