Provide zblog template_zblog them_wordpress template download and customization

Zblogphp Reader Wall Page Making Tutorial

Tianxing Studio 2015-05-07 20:11 Zblogphp Tutorial seven thousand two hundred and eighty-eight 5 Comments


Prior statement: zblogphp Of Reader Wall This function can be realized directly by plug-ins. Plug in address: Click on me to arrive The plug-in author is "Tang Dynasty", and this article zblog The PHP reader wall page production tutorial also comes from this plug-in.

Small white users should use plug-ins directly. Those who do not want to use plug-ins can follow the methods in this article. Direct code:

Step 1: Add function.

 function tx_Readers() { global $zbp; $date =100; $dzgs =100; $b = mktime(0,0,0,date('m'),date('d')-$date,date('Y')); $e = mktime(0,0,0,date('m'),date('d')+1,date('Y')); $x = 1111; $rs=100; $sql = $zbp->db->sql->Select( $zbp->table['Comment'], array('COUNT(comm_ID) AS cnt, comm_Name, comm_HomePage , comm_Email'), array( array('<>', 'comm_Email', $x), Array ('<>', 'comm_Name', 'visitor'), array('<>', 'comm_Name', 'admin'), array('BETWEEN', 'comm_PostTime', $b, $e), array('CUSTOM', '1=1 GROUP BY comm_HomePage') ), array('comm_PostTime' => 'DESC'), $dzgs, null ); $array=$zbp->db->Query($sql); $s="<ul class='readers-list'>"; $s .= "\r\n";     foreach ($array as $comment) {         $r="rel='external nofollow'";         $s .=  '<li><a href="'.$comment['comm_HomePage'] . '" ' .  $r . 'title="'. $comment ['comm_Name']. '(Teach'. $comment ['cnt '].' times)" target="_blank"><img src=“ http://cn.gravatar.com/avatar/ ' .md5(strtolower($comment['comm_Email'])).' &R=X&s=80 "alt=" avatar "class=" avatar avatar-36 photo "height=" 40 "width=" 40 "/><h4>'. $comment ['comm_Name']. '</h4><p>comment'. $comment ['cnt '].' times</p><div class=" clear "></div></a></li>';         $s .= "\r\n";     }      $s .= "</ul>"; $s .= "\r\n"; return $s; }

The above code is placed in the theme configuration file: "include. php". The parameters to be modified are:

The 100 in the third line represents the time span of the caller; 100 in the fourth line represents the number of callers; The 100 in the eighth line is also the number of callers of the message, which should be consistent with the previous one.

The bottom<ul></ul>contains the html code that is called.


Step 2: Topic call

You want the reader wall to appear Template Add the following code to the page:

 {php}echo  tx_Readers(); {/php}


Step 3: beautify css. In this step, please operate as required.


Final effect: https://www.txcstx.com/Readers.html

Demo screenshot:

 Zblogphp Reader Wall Page Making Tutorial zblog Tutorial Reader Wall zblogphp Tutorial Page 1


Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

yes five Comments from netizens:

  •  BeautifulDays

    BeautifulDays 8 years ago (2016-06-25) reply

    My site has enabled pseudo static. How can I use this plug-in? ReaderWall is pseudo static as readers.html, just like your interface?

    •  Tianxing Studio

      Tianxing Studio 8 years ago (2016-06-26) reply

      Well, I said I didn't use plug-ins I don't know how the plug-in is pseudo static.

      •  BeautifulDays

        BeautifulDays 8 years ago (2016-07-03) reply

        Hello, I used your plug-in, and then there was a problem

        •  Tianxing Studio

          Tianxing Studio 8 years ago (July 5, 2016) reply

          Contact the plug-in author. This plug-in is not mine

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation
  • Sign in
  • Registered account Forgot your password?
  • register
  • Already have an account? Direct login Forgot your password?
  • Social account login