1
jmzlt
how to let Myalbum show part of descriptin in picture list page?
  • 2006/12/6 2:58

  • jmzlt

  • Just popping in

  • Posts: 4

  • Since: 2006/8/30


Does anyone know how to let Myalbum show part of descriptin in picture list page?(for example show former 100 characters of each picture's description in picture list page?) and show full description in dividal picture page?


Look at below hyperlinks:

Show former 100 characters of each picture's description in this page



Show full description of picture in this page

2
chippyash
Re: how to let Myalbum show part of descriptin in picture list page?
  • 2006/12/6 7:26

  • chippyash

  • Friend of XOOPS

  • Posts: 501

  • Since: 2004/1/29


Not guaranteeing this is going to work but give it a try.

AT line 28 of myalbum/index.php replace

Quote:
$prs = $xoopsDB->query( "SELECT l.lid, l.cid, l.title, l.ext, l.res_x, l.res_y, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.submitter, t.description FROM $table_photos l LEFT JOIN $table_text t ON l.lid=t.lid WHERE l.status>0 ORDER BY date DESC" , $myalbum_newphotos , 0 ) ;


with

Quote:
$prs = $xoopsDB->query( "SELECT l.lid, l.cid, l.title, l.ext, l.res_x, l.res_y, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.submitter, LEFT(t.description,100) FROM $table_photos l LEFT JOIN $table_text t ON l.lid=t.lid WHERE l.status>0 ORDER BY date DESC" , $myalbum_newphotos , 0 ) ;


Notice we changed the t.description to LEFT(t.description,100)

Report back here so others can share.

Regards
A

3
jmzlt
Re: how to let Myalbum show part of descriptin in picture list page?
  • 2006/12/11 6:57

  • jmzlt

  • Just popping in

  • Posts: 4

  • Since: 2006/8/30


Thank you, Akitson!

I modified the code of MyAlbum with above suggestion, got below result:

http://wrlight.com/modules/myalbum/index.php

Is there any further suggestion?

Login

Who's Online

462 user(s) are online (379 user(s) are browsing Support Forums)


Members: 0


Guests: 462


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits