First of all, the CMS system does not need to be introduced too much. It's a good dream!
Ghost (this is only 5.7 text-and-text magic light style ). Recently, when I was working on the gallery template mentioned by a woman, I found that the default gallery template of dede could not achieve the paging style like the document. I have repeatedly asked du Niang and Gu Ge for no results, therefore, I carefully studied the dream weaving file and found that the dream can achieve this style (for example ). Now I will share my ideas with you, which is also the most popular focus on the weimeng forum!
Problem Analysis:
To implement this paging method, you must call the thumbnail address when paging, but open the tab file and check that there is no thumbnail data. What should we do. We can only create a function dedicated to gallery paging calls through secondary development. If you want to change {dede: pagebreak/}, problems may occur in the paging method of the article. Therefore, we recommend that you create a function to avoid other problems.
Solution:
Step 1: Open arc_archives_class.php and add the following code at the end of the include directory:
/**
* Obtain the thumbnail list of images in the dynamic page Gallery.
*
* @ Access public
* @ Param int $ total number of pages in totalPage
* @ Param int $ nowPage current page number
* @ Param int $ aid Document id
* @ Return string
*/
Function GetlitpicDM_list ($ totalPage, $ nowPage, $ aid)
{
Global $ dsql, $ sqlCt;
$ Attlist = "desclen | 80 ";
FillAttsDefault ($ ctag-> cattriems-> Items, $ attlist );
Extract ($ ctag-> cattriact-> Items, EXTR_SKIP );
If (! Isset ($ this-> addTableRow ['imgurls']) return;
$ Revalue = '';
$ Dtp = new DedeTagParse ();
$ Dtp-> LoadSource ($ this-> addTableRow ['imgurls']);
$ Images = array ();
If (is_array ($ dtp-> CTags ))
{
$ Pagenum = 1;
Foreach ($ dtp-> CTags as $ ctag1)
{
If ($ ctag1-> GetName () = "img ")
{
$ Litpic. = '<LI>
<DIV class = img> <A title = "'. $ ctag1-> GetAtt ('text ').'"
Href = "view. php? Aid = '. $ aid.' & pageno = '. $ pagenum.' "> Style = "BACKGROUND-IMAGE: url ('. $ ctag1-> GetAtt ('ddimg ').')"
Src = "'. $ GLOBALS ['cfg _ templets_skin']. '/tukustyle/blankBg.gif"> </A> </DIV> <
Href = "view. php? Aid = '. $ aid. '& pageno = '. $ pagenum. '"> '. substr ($ ctag1-> GetAtt ('text'), 30 ). '</A> </LI> ';
$ Pagenum ++;
}
}
}
Return $ litpic;
}
/**
* Obtain the thumbnail list of images in the static page Gallery.
*
* @ Access public
* @ Param int $ total number of pages in totalPage
* @ Param int $ nowPage current page number
* @ Param int $ aid Document id
* @ Return string
*/
Function Getlitpic_list ($ totalPage, $ nowPage, $ aid)
{
Global $ dsql, $ sqlCt;
$ Attlist = "desclen | 80 ";
FillAttsDefault ($ ctag-> cattriems-> Items, $ attlist );
Extract ($ ctag-> cattriact-> Items, EXTR_SKIP );
If (! Isset ($ this-> addTableRow ['imgurls']) return;
$ Revalue = '';
$ Dtp = new DedeTagParse ();
$ Dtp-> LoadSource ($ this-> addTableRow ['imgurls']);
$ Images = array ();
If (is_array ($ dtp-> CTags ))
{
$ Pagenum = 1;
Foreach ($ dtp-> CTags as $ ctag1)
{
If ($ ctag1-> GetName () = "img ")
{
If ($ pagenum = 1)
{
$ Litpic. = '<LI>
<DIV class = img> <A title = "'. $ ctag1-> GetAtt ('text ').'"
Href = "'. $ this-> NameFirst.'. '. $ this-> ShortName.'"> Style = "BACKGROUND-IMAGE: url ('. $ ctag1-> GetAtt ('ddimg ').')"
Src = "'. $ GLOBALS ['cfg _ templets_skin']. '/tukustyle/blankBg.gif"> </A> </DIV> <
Href = "'. $ this-> NameFirst. '_'. $ pagenum. '. '. $ this-> ShortName. '"> '. substr ($ ctag1-> GetAtt ('text'), 0, 30 ). '</A> </LI> ';
}
Else
{
$ Litpic. = '<LI>
<DIV class = img> <A title = "'. $ ctag1-> GetAtt ('text ').'"
Href = "'. $ this-> NameFirst.' _ '. $ pagenum.'. '. $ this-> ShortName.'"> Style = "BACKGROUND-IMAGE: url ('. $ ctag1-> GetAtt ('ddimg ').')"
Src = "'. $ GLOBALS ['cfg _ templets_skin']. '/tukustyle/blankBg.gif"> </A> </DIV> <
Href = "'. $ this-> NameFirst. '_'. $ pagenum. '. '. $ this-> ShortName. '"> '. substr ($ ctag1-> GetAtt ('text'), 0, 30 ). '</A> </LI> ';
}
$ Pagenum ++;
}
}
}
Return $ litpic;
}
Finally, the template is called. This is not detailed. Of course, this is just a method! This article is the first webmaster website. If a woman says the original content, please indicate the source for reprinting. Like a friend can go to a woman to see the actual effect of http://tuku.nvsay.com