WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
$slider_page_ids = '28,26,34';
$slider_image_base = WB_URL.MEDIA_DIRECTORY.'/slide'
why slide1.jpg, slide2.jpg, slide3.jpg?its the number of the array-key
while($page = $query_pages->fetchRow()) {$i++;$page_id = $page['page_id'];$nr = $i; //Use $page_id OR $i for picture numbers. $i (1, 2, 3...) is easier to handle, $page_id is mor specific....
if (!isset($p_id) OR $p_id==4 OR $p_id==4) { include('snippets/responsiveslides.php'); include('snippets/nav.php'); include('snippets/site-headline.php');} else { include('snippets/miniheader.php'); include('snippets/nav.php');}include('snippets/playground.php');include('snippets/2col-content.php');
$slider_page_ids = '26,28,34';$slider_image_base = MEDIA_DIRECTORY.'/slide'; // added: number + .jpg
$slider_image_base = WB_URL.MEDIA_DIRECT ORY.'/my_slides/slide'
if (!isset($page_id) OR $page_id==4 OR $page_id==4) {
if (!isset($page_id) OR $page_id==4 OR $page_id==6) {
Quote$slider_image_base = WB_URL.MEDIA_DIRECT ORY.'/my_slides/slide'if this path is not correct or the called pictures doesnt exist, it look's like the slider is not implemented on this or on all pages
if (!isset($page_id) OR $page_id==24 OR $page_id==2) { include('snippets/responsiveslides.php'); include('snippets/nav.php'); include('snippets/site-headline.php');} else { include('snippets/miniheader.php'); include('snippets/nav.php');}include('snippets/playground.php');include('snippets/2col-content.php');
while($page = $query_pages->fetchRow()) { $i++; $page_id = $page['page_id']; $nr = $page_id; //Use $page_id OR $i for picture numbers. $i (1, 2, 3...) is easier to handle, $page_id is mor specific. //Start output: $l = '<li><img class="img-responsive" src="'.$slider_image_base.$nr.'.jpg" alt="'.$page['menu_title'].'">
<?php if(!defined('WB_URL')) { header('Location: ../../../index.php'); exit(0); } ?> <!-- banner --> <div class="banner"> <!-- slider --> <!-- img-slider --> <div class="img-slider"> <!--start-slider-script--> <script src="<?php echo TEMPLATE_DIR; ?>/js/responsiveslides.min.js"></script> <script> $(function () { // Slideshow 4 $("#slider4").responsiveSlides({ auto: true, pager: true, nav: true, speed: 500, namespace: "callbacks", before: function () { $('.events').append("<li>before event fired.</li>"); }, after: function () { $('.events').append("<li>after event fired.</li>"); } }); }); </script> <!-- End-slider-script--> <!-- Slideshow 4 --> <div id="top" class="callbacks_container"> <ul class="rslides" id="slider4"><?php$theq = "SELECT * FROM `".TABLE_PREFIX."pages` WHERE page_id IN (".$slider_page_ids.");" ;$query_pages = $database->query($theq);if($query_pages->numRows() < 1) { //do nothing} else { $i = 0; while($page = $query_pages->fetchRow()) { $i++; $new_page_id = $page['page_id']; $nr = $new_page_id; //Use $new_page_id OR $i for picture numbers. $i (1, 2, 3...) is easier to handle, $new_page_id is mor specific. //Start output: $l = '<li><img class="img-responsive" src="'.$slider_image_base.$nr.'.jpg" alt="'.$page['menu_title'].'"><div class="slider-caption"><h1>'.$page['page_title'].'</h1><p>'.$page['description'].'</p>';$l .= '<a class="caption-btn" href="'.WB_URL.PAGES_DIRECTORY.$page['link'].PAGE_EXTENSION.'">'.$TEXT['READ_MORE'].'</a>';$l .= '</div></li>';echo $l; }}?></ul> </div><div class="clearfix"> </div></div><!-- slider --></div><!-- end banner -->
$slider_image_base = WB_URL.MEDIA_DIRECTORY.'/sliderpics/slide'
$slider_image_base = TEMPLATE_DIR.'/slide'
$slider_image_base = TEMPLATE_DIR.'/sliderpics/slide'
<?phpif(!defined('WB_URL')) { header('Location: ../index.php'); exit(0);} $slider_page_ids = '26,28,34';$slider_image_base = WB_URL.MEDIA_DIRECTORY.'/slider/slide'; // added: number + .jpg?><!DOCTYPE html><html><head><?phpif(function_exists('simplepagehead')) { simplepagehead(); } else { ?><title><?php page_title(); ?></title><meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>" /><meta name="description" content="<?php page_description(); ?>" /><meta name="keywords" content="<?php page_keywords(); ?>" /><?php }if(function_exists('register_frontend_modfiles')) { register_frontend_modfiles('css'); //register_frontend_modfiles('jquery'); register_frontend_modfiles('js');} ?><!-- jQuery (necessary for Bootstrap's JavaScript plugins) --><script src="<?php echo TEMPLATE_DIR; ?>/js/jquery.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1"><!-- Bootstrap --><link href="<?php echo TEMPLATE_DIR; ?>/css/bootstrap.min.css" rel="stylesheet"><!--link href="<?php echo TEMPLATE_DIR; ?>/css/font-awesome.min.css" rel="stylesheet"--><link href="<?php echo TEMPLATE_DIR; ?>/editor.css" rel="stylesheet" /><link href="<?php echo TEMPLATE_DIR; ?>/screen.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --><!-- WARNING: Respond.js doesn't work if you view the page via file:// --><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]--></head><?php ob_start(); page_content(1);$page_content_1 = ''.ob_get_contents();ob_end_clean();if(defined('TOPIC_BLOCK2') AND TOPIC_BLOCK2 != '') { $page_content_2 = TOPIC_BLOCK2; } else { ob_start(); page_content(2); $page_content_2 = ''.ob_get_contents(); ob_end_clean();} //if($page_content_2 == '') {$page_content_2 = '<img class="img-responsive" src="'.TEMPLATE_DIR.'/img/about.jpg" title="'.WEBSITE_TITLE.'" />';} ?><body> <?php if (!isset($page_id) OR $page_id==24 OR $page_id==2) { include('snippets/responsiveslides.php'); include('snippets/nav.php'); include('snippets/site-headline.php');} else { include('snippets/miniheader.php'); include('snippets/nav.php');}include('snippets/playground.php');include('snippets/2col-content.php');?> <div class="container"> <div class="row"> <div class="col-lg-12"> <div class="copyright"> <p> <span><?php page_footer(); if ($page_id % 5 == 1) {echo '<br/><span style="font-size:10px;">Based on design by <a href="http://www.beesign.com" target="_blank">Grafik und Webdesign in Wien</a></span>'; } ?></span> </p> </div> </div> </div></div> <!-- Include all compiled plugins (below), or include individual files as needed --><script src="<?php echo TEMPLATE_DIR; ?>/js/bootstrap.min.js"></script><!-- script src="<?php echo TEMPLATE_DIR; ?>/js/responsive-slider.js"></script --></body></html>
<img class="img-responsive" src="<?php echo TEMPLATE_DIR; ?>/img/slide1.jpg" alt=""> ....<img class="img-responsive" src="<?php echo TEMPLATE_DIR; ?>/img/slide2.jpg" alt=""> ....<img class="img-responsive" src="<?php echo TEMPLATE_DIR; ?>/img/slide3.jpg" alt="">
<img class="img-responsive" src="<?php echo WB_URL.MEDIA_DIRECTORY; ?>/slider/slide26.jpg" alt=""> ....<img class="img-responsive" src="<?php echo WB_URL.MEDIA_DIRECTORY; ?>/slider/slide28.jpg" alt=""> ....<img class="img-responsive" src="<?php echo WB_URL.MEDIA_DIRECTORY; ?>/slider/slide24.jpg" alt="">
<?php echo TEMPLATE_DIR.'/img/slide'.$slidenr.'.jpg'; ?>
<div style="margin-bottom:30px; padding:7%; background: url(<?php echo WB_URL.MEDIA_DIRECT ORY.'/slider/slide'.$slidenr.'.jpg'; ?>) no-repeat left center; background-size: 100% auto, auto;"></div>
jacobi22, you are quite brilliant!
Is there a way to link only pages 26, 28, 34 to the images with the same id and all other pages to a single image (slide1.jpg) for example?If it's too much trouble, don't worry, though. You have been of amazing assistance already!
$slidenr = ($page_id % 3) + 1
if ($page_id == 26 || Spage_id = 28 || $page_id == 34){$slidenr = $page_id;}else{$slidenr = 1;}?>
Code: [Select]if ($page_id == 26 || Spage_id = 28 || $page_id == 34){$slidenr = $page_id;}else{$slidenr = 1;}?>
if ($page_id == 26 || $page_id == 28 || $page_id == 34){