Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

carousel display - help wanted

Asked Modified Viewed 2,289 times
C
Catzenjaeger
C
  • Senior Member, joined since
  • Contributed 408 posts on the community forums.
  • Started 137 threads in the forums
  • Started this discussions
asked
Senior Member

I am looking for a carousel display for my site. Several figures are to be displayed side by side. The arrows should be on the right and left. When the mouse is touched, the popup should open again. Click on the figu to open the database entry. Is that possible? I made some attempts but gave up.

Does anyone have such a thing or can help?

www.php-fusion.co.uk/infusions/forum/attachments/carusel.jpg
Catzenjaeger attached the following file:
carusel.jpg [No information available / 110 Downloads]
0 replies

6 posts

C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

You can actually. Have a look at this : http://www.bootply.com/94452
0 replies
C
Catzenjaeger
C
  • Senior Member, joined since
  • Contributed 408 posts on the community forums.
  • Started 137 threads in the forums
  • Started this discussions
answered
Senior Member

Thanx -- Looks good but on question i have: how can i fill this dynamicly?

www.php-fusion.co.uk/infusions/forum/attachments/unbenannt_7.jpg


The user should not only be able to see 5 images, but should also be able to scan all the files in the database. Here, in the example, everything is limited to 5

here my code from my Panels on startsite

<?php
/********************************************************** ****************
 *   LATEST FIGURES CENTER PANEL ALIEN                                     *
 *                                                                         *
 *   Copyright (C) 2017 Catzenjaeger                                       *
 *   www.aliencollectors.com                                               *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
if (!defined("IN_FUSION")) { die("Access Denied"); }

include INFUSIONS."figurelib/infusion_db.php";
require_once INCLUDES."infusions_include.php";
require_once INFUSIONS."figurelib/_functions.inc.php";

// CSS
echo "<style type='text/css'>
.badge {
  padding: 1px 9px 2px;
  font-size: 12.025px;
  font-weight: bold;
  white-space: nowrap;
  color: #ffffff;
  background-color: #999999;
  -webkit-border-radius: 9px;
  -moz-border-radius: 9px;
  border-radius: 9px;
}
.badge:hover {
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}
.badge-error {
  background-color: #b94a48;
}
.badge-error:hover {
  background-color: #953b39;
}
.badge-warning {
  background-color: #f89406;
}
.badge-warning:hover {
  background-color: #c67605;
}
.badge-success {
  background-color: #468847;
}
.badge-success:hover {
  background-color: #356635;
}
.badge-info {
  background-color: #3a87ad;
}
.badge-info:hover {
  background-color: #2d6987;
}
.badge-inverse {
  background-color: #333333;
}
.badge-inverse:hover {
  background-color: #1a1a1a;
}

   </style> ";


// LANGUAGE
if (file_exists(INFUSIONS."figurelib/locale/".LOCALESET."locale_figurelib.php")) {
   include INFUSIONS."figurelib/locale/".LOCALESET."locale_figurelib.php";
} else {
   include INFUSIONS."figurelib/locale/English/locale_figurelib.php";
}
      // SEETING FIGURES PER SITE
      // ATTENTION - ONLY 6 / 12 / 18
      $limit = 6;
      
      // Set Empty Arrays
      $info = array("figure_rows" => 0, "page_nav" => false);
      $info['item'] = array();

      // Count all Figures
      $max_rows = dbcount("(figure_id)", DB_FIGURE_ITEMS, "figure_freigabe=1 AND figure_class='2' AND ".groupaccess("figure_visibility")."");
      
      // Check Rowstart
      $_GET['rowstartalien'] = isset($_GET['rowstartalien']) && isnum($_GET['rowstartalien']) && $_GET['rowstartalien'] <= $max_rows ? $_GET['rowstartalien'] : 0;   
   
   if ($max_rows) {
               
// DATENBANK AUSLESEN UND DATEN BEREITSTELLEN
$resultalien = dbquery("
   SELECT
      tb.figure_id, tb.figure_class, tb.figure_submitter, tb.figure_freigabe, tb.figure_pubdate, tb.figure_scale, tb.figure_title, tb.figure_manufacturer, tb.figure_brand, tb.figure_datestamp, tb.figure_cat, tb.figure_clickcount,
      tbc.figure_cat_id, tbc.figure_cat_name,
      tbu.user_id, tbu.user_name, tbu.user_status, tbu.user_avatar,
      tbm.figure_manufacturer_name,
      tbb.figure_brand_name,
      tbs.figure_scale_id, tbs.figure_scale_name
   FROM ".DB_FIGURE_ITEMS." tb
   LEFT JOIN ".DB_USERS." tbu ON tb.figure_submitter=tbu.user_id
   LEFT JOIN ".DB_FIGURE_CATS." tbc ON tb.figure_cat=tbc.figure_cat_id
   LEFT JOIN ".DB_FIGURE_MANUFACTURERS." tbm ON tbm.figure_manufacturer_id = tb.figure_manufacturer
   LEFT JOIN ".DB_FIGURE_BRANDS." tbb ON tbb.figure_brand_id = tb.figure_brand
   LEFT JOIN ".DB_FIGURE_SCALES." tbs ON tbs.figure_scale_id = tb.figure_scale
   ".(multilang_table("FI") ? "WHERE figure_language='".LANGUAGE."' AND" : "WHERE")." tb.figure_freigabe='1' AND tb.figure_class='2' AND ".groupaccess("tb.figure_visibility")."
   ORDER BY figure_datestamp DESC
   LIMIT ".$_GET['rowstartalien'].",".$limit."
   ");

         // Pagenav      
         //$info['page_nav'] = $max_rows > $limit ? makepagenav($_GET['rowstartalien'], $limit, $max_rows, 6, FUSION_SELF."?") : 0;
         $info['page_nav'] = $max_rows > $limit ? makepagenav($_GET['rowstartalien'], $limit, $max_rows, 2, FUSION_SELF."?", "rowstartalien") : 0;
         
// PANEL ÖFFNEN / ANFANG      
$Counter = dbcount("(figure_id)", DB_FIGURE_ITEMS, "figure_freigabe='1' AND figure_class='2'");
//opentable("<b>Last Alien Figures</b> (".$Counter.") ".($info['page_nav'] ? "<span class='pull-right'>".$info['page_nav']."</span>" : "")."");

opentable("<strong>Aliens:</strong> <span class='badge badge-error'> ".$Counter."</span> ".($info['page_nav'] ? "<span class='pull-right'>".$info['page_nav']."</span>" : "")."");

   
// WENN DATEN UNGLEICH = 0 DANN DARSTELLUNG DER DATEN
if (dbrows($resultalien) != 0) {

   echo "<hr>";   
   
         echo "<div class='container-fluid'>\n";
      echo "<div class='row'>\n";   
      
   while($data = dbarray($resultalien)) {      

            
      // Get Image
      $imageURL = figures_getImagePath("figure", "thumb", $data['figure_id']);
         
      echo "<div class='col-lg-2 col-md-4 col-sm-4 col-xs-4 text-center'>\n";   
                  
   // Popover über Bild
         //echo"<div class='side-small figurelib-inforow-height'>";
         
         echo"<a href='".INFUSIONS."figurelib/figures.php?figure_id=".$data['figure_id']."' class='' tabindex='0' data-toggle='popover' data-trigger='hover' data-popover-content='#".$data['figure_id']."' data-placement='top'><div class='side-small figurelib-inforow-height'><img src='".$imageURL."' alt='".$locale['CLFP_002']." : ".$data['figure_title']."' title='".$locale['CLFP_002']." : ".$data['figure_title']."' style='border:0px;max-height:100px;max-width:100px'/></div></a>";
         
               // Content for Popover   
               echo"<div id='".$data['figure_id']."' class='hidden'>";
                  
                  echo"<div class='popover-heading'>Short Preview</div>";                          
                  echo"<div class='popover-body'>";
                  
                     echo"<img src='".$imageURL."' alt='".$locale['CLFP_002']." : ".$data['figure_title']."' title='".$locale['CLFP_002']." : ".$data['figure_title']."' style='border:0px;max-height:250px;max-width:250px'/>";
                                 
               // COLUMN 2 (name of figure)   
                     echo "<div class='side-small title='".$locale['CLFP_002']." : ".$data['figure_title']."' alt='".$locale['CLFP_002']." : ".$data['figure_title']."'><small><b>Name:</b> ".$data['figure_title']."</small></div>";
                                 
               // COLUMN 3 (manufacturer)
                     echo "<div class='side-small title='".$locale['CLFP_003']." : ".$data['figure_manufacturer_name']."' alt='".$locale['CLFP_003']." : ".$data['figure_manufacturer_name']."'><small><b>Manufacturer:</b> ".$data['figure_manufacturer_name']."</small></div>\n";
                              
               // COLUMN 4 (brand)
                     echo "<div class='side-small title='".$locale['CLFP_004']." : ".$data['figure_brand_name']."' alt='".$locale['CLFP_004']." : ".$data['figure_brand_name']."'><small><b>Brand:</b> ".$data['figure_brand_name']."</small></div>\n";
            
               // COLUMN 5 (scale)         
                     echo "<div class='side-small title='".$locale['CLFP_005']." : ".$data['figure_scale_name']."' alt='".$locale['CLFP_005']." : ".$data['figure_scale_name']."'><small><b>Scale:</b> ".$data['figure_scale_name']."</small></div>\n";
               
               // COLUMN 6 (release date)
               // No release date or unknown = "no data" / WENN KEIN WERT ZUM DATUM IN DB DANN ZEIGE HINWEIS "NO DATA"
                  if ($data['figure_pubdate'] == "") {
                     echo "<div class='side-small title='".$locale['CLFP_006']." : ".$locale['CLFP_008']."' alt='".$locale['CLFP_006']." : ".$locale['CLFP_008']."'><small><b>Release:</b> ".$locale['CLFP_008']."</small></div>\n";
                  } else {
                     echo "<div class='side-small' title='".$locale['CLFP_006']." : ".$data['figure_pubdate']."' alt='".$locale['CLFP_006']." : ".$data['figure_pubdate']."'><small><b>Release:</b> ".$data['figure_pubdate']."</small></div>\n";
                  }

               // COLUMN 7 (rating)
                  $drating = dbarray(dbquery("
                     SELECT
                        SUM(rating_vote) sum_rating,
                        COUNT(rating_item_id) count_votes
                        FROM ".DB_RATINGS."
                        WHERE rating_type='FI'
                        AND  rating_item_id='".$data['figure_id']."'
                  "));
                  $rating = ($drating['count_votes'] > 0 ? str_repeat("<img src='".INFUSIONS.$inf_folder."/images/starsmall.png'>", ceil($drating['sum_rating']/$drating['count_votes'])) : "-");

                     echo "<div class='side-small' title='".$locale['CLFP_010']."' alt='".$locale['CLFP_010']."'><small><b>Rating:</b> ".$rating."</small></div>\n";
                        
               // COLUMN 8 Usercount
                     $count = dbcount("(figure_userfigures_id)", DB_FIGURE_USERFIGURES, "figure_userfigures_figure_id='".$data['figure_id']."'");   
                     echo "<div class='side-small' title='".$locale['CLFP_020']." : ".$count."' alt='".$locale['CLFP_020']." : ".$count."'><small><b>Usercount:</b> ".trimlink($count,6)."</small></div>\n";
                        
               echo "</div>\n";                                    
            echo "</div>\n";   

         //echo "</div>\n";         
         
   // Popover über Name
         echo"<a href='".INFUSIONS."figurelib/figures.php?figure_id=".$data['figure_id']."' class='' tabindex='0' data-toggle='popover' data-trigger='hover' data-popover-content='#".$data['figure_id']."' data-placement='top'><small>".trimlink($data['figure_title'],12)."</small></a>";
         
               // Content for Popover   
               echo"<div id='".$data['figure_id']."' class='hidden'>";
                  
                  echo"<div class='popover-heading'>Short Preview</div>";                          
                  echo"<div class='popover-body'>";
                  
                     echo"<img src='".$imageURL."' alt='".$locale['CLFP_002']." : ".$data['figure_title']."' title='".$locale['CLFP_002']." : ".$data['figure_title']."' style='border:0px;max-height:250px;max-width:250px'/>";
                                 
               // COLUMN 2 (name of figure)   
                     echo "<div class='side-small title='".$locale['CLFP_002']." : ".$data['figure_title']."' alt='".$locale['CLFP_002']." : ".$data['figure_title']."'><small><b>Name:</b> ".$data['figure_title']."</small></div>";
                                 
               // COLUMN 3 (manufacturer)
                     echo "<div class='side-small title='".$locale['CLFP_003']." : ".$data['figure_manufacturer_name']."' alt='".$locale['CLFP_003']." : ".$data['figure_manufacturer_name']."'><small><b>Manufacturer:</b> ".$data['figure_manufacturer_name']."</small></div>\n";
                              
               // COLUMN 4 (brand)
                     echo "<div class='side-small title='".$locale['CLFP_004']." : ".$data['figure_brand_name']."' alt='".$locale['CLFP_004']." : ".$data['figure_brand_name']."'><small><b>Brand:</b> ".$data['figure_brand_name']."</small></div>\n";
            
               // COLUMN 5 (scale)         
                     echo "<div class='side-small title='".$locale['CLFP_005']." : ".$data['figure_scale_name']."' alt='".$locale['CLFP_005']." : ".$data['figure_scale_name']."'><small><b>Scale:</b> ".$data['figure_scale_name']."</small></div>\n";
               
               // COLUMN 6 (release date)
               // No release date or unknown = "no data" / WENN KEIN WERT ZUM DATUM IN DB DANN ZEIGE HINWEIS "NO DATA"
                  if ($data['figure_pubdate'] == "") {
                     echo "<div class='side-small title='".$locale['CLFP_006']." : ".$locale['CLFP_008']."' alt='".$locale['CLFP_006']." : ".$locale['CLFP_008']."'><small><b>Release:</b> ".$locale['CLFP_008']."</small></div>\n";
                  } else {
                     echo "<div class='side-small' title='".$locale['CLFP_006']." : ".$data['figure_pubdate']."' alt='".$locale['CLFP_006']." : ".$data['figure_pubdate']."'><small><b>Release:</b> ".$data['figure_pubdate']."</small></div>\n";
                  }

               // COLUMN 7 (rating)
                  $drating = dbarray(dbquery("
                     SELECT
                        SUM(rating_vote) sum_rating,
                        COUNT(rating_item_id) count_votes
                        FROM ".DB_RATINGS."
                        WHERE rating_type='FI'
                        AND  rating_item_id='".$data['figure_id']."'
                  "));
                  $rating = ($drating['count_votes'] > 0 ? str_repeat("<img src='".INFUSIONS.$inf_folder."/images/starsmall.png'>", ceil($drating['sum_rating']/$drating['count_votes'])) : "-");

                     echo "<div class='side-small' title='".$locale['CLFP_010']."' alt='".$locale['CLFP_010']."'><small><b>Rating:</b> ".$rating."</small></div>\n";
                        
               // COLUMN 8 Usercount
                     $count = dbcount("(figure_userfigures_id)", DB_FIGURE_USERFIGURES, "figure_userfigures_figure_id='".$data['figure_id']."'");   
                     echo "<div class='side-small' title='".$locale['CLFP_020']." : ".$count."' alt='".$locale['CLFP_020']." : ".$count."'><small><b>Usercount:</b> ".trimlink($count,6)."</small></div>\n";
                        
               echo "</div>\n";                                    
            echo "</div>\n";
               
      ?>
      

            <div style='side-small text-align: center;'>
                              
                     <!-- Manufacturer -->                     
                     <span class="small" title="Manufacturer: <?= $data['figure_manufacturer_name']; ?>"></span><i class="fa fa-fw fa-cogs"></i> <a href="<?= INFUSIONS."figurelib/figures.php?figures.php?manufacturer_id=".$data['figure_manufacturer']; ?>" class="small"> <?= trimlink($data['figure_manufacturer_name'], 10); ?></a><br />
                                          
                     <!-- Views -->
                     <span class="small" title="Views: <?= $data['figure_clickcount']; ?>"><i class="fa fa-fw fa-eye"></i> <?= $data['figure_clickcount']; ?></span><br />
                                                   
                     <?php
                     // COMMENTS
                     $comments = dbcount("(comment_id)", DB_COMMENTS, "comment_type='FI' AND comment_item_id='".$data['figure_id']."'");
                     echo "<span class='small' title='Figure/item comments: ".$comments."'><i class='fa fa-fw fa-comments'></i>".$comments."</span><br />\n";
                     
                     // <!-- Ratings Counter -->
                     // Bewertung
                        $drating = dbarray(dbquery("
                            SELECT
                              SUM(rating_vote) sum_rating,
                                 COUNT(rating_item_id) count_votes
                                 FROM ".DB_RATINGS."
                                 WHERE rating_type='FI'
                                 AND  rating_item_id='".$data['figure_id']."'
                              "));
                        $rating = ($drating['count_votes'] > 0 ? str_repeat("<img src='".INFUSIONS.$inf_folder."/images/starsmall.png'>",ceil($drating['sum_rating']/$drating['count_votes'])) : "-");
                        
                        echo "<span class='small' title='Rating'><i class='fa fa-fw fa-star'></i>".$rating."</span><br />\n";
                        
                        //echo "<hr />\n";
                        
                        ?>
                        
                     <?php if ((iADMIN || iSUPERADMIN) && checkrights("FI")) { ?>
                       <a href="<?= INFUSIONS."figurelib/admin.php".fusion_get_aidlink()."&amp;section=figurelib_form&amp;action=edit&amp;figure_id=".$data['figure_id']; ?>" class="small"><i class="fa fa-fw fa-pencil"></i> <?= $locale['edit']; ?></a><br />
                     <?php } ?>
                     
                     
            </div>         
      <?php


            
         echo "</div>\n";            
      
   }
   

      
      echo "</div>\n";
      echo "</div>\n";   
   
   }
   

   
   
// PAGE NAV
      //echo "<hr>";
      //echo $info['page_nav'] ? "<div class='text-center'>".$info['page_nav']."</div>" : '';
      echo "<hr>";
   
} else {
   echo "<div style='text-align: center;'>".$locale['CLFP_001']."</div>"; // 001 = No figures available"
}
closetable();

// FUNCTION FOR POPUP
add_to_footer("<script type='text/javascript'>$(function(){
    $('[data-toggle=popover]').popover({
        html : true,
        content: function() {
          var content = $(this).attr('data-popover-content');
          return $(content).children('.popover-body').html();
        },
        title: function() {
          var title = $(this).attr('data-popover-content');
          return $(title).children('.popover-heading').html();
        }
    });
}); </script>");


Catzenjaeger attached the following file:
unbenannt_7.jpg [No information available / 100 Downloads]
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin


  while($data = dbarray($resultalien)) {     

           
      // Get Image
      $imageURL = figures_getImagePath("figure", "thumb", $data['figure_id']);
         



Item

0 replies
C
Catzenjaeger
C
  • Senior Member, joined since
  • Contributed 408 posts on the community forums.
  • Started 137 threads in the forums
  • Started this discussions
answered
Senior Member

hmnn dont understand that. I would like to show in the Panle 5 figures next to each other. So ID 1 to 5. If one then press on the arrow on the side is the content then correspondingly higher indicate .... for example ID 2-6 / 3-7 / 4-8 and so on
My code above shows the images of a figure. But only one thing and one figure!
Thanx for help me smile
I need urgently this panel because user complained that my site is very slow and always refreshing. It's frustrating.
0 replies
C
Catzenjaeger
C
  • Senior Member, joined since
  • Contributed 408 posts on the community forums.
  • Started 137 threads in the forums
  • Started this discussions
answered
Senior Member

None? hmnnn i want to Show my figures like a shop viev (figures = shopitems)
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

echo your html content you showed within the brackets Chan provided and populate it with data.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 6 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
C
C
  • Senior Member, joined since
  • Contributed 408 posts on the community forums.
  • Started 137 threads in the forums
  • Started this discussions
C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet