แอ้ดมินครับ ช่วยด้วยครับ เรื่อง สไลค์ให้ทำงานตามที่เซิฟกำลังทำงานครับ

ถาม-ตอบ แนะนำไอเดียว โค้ดตัวอย่าง แนวทาง วิธีแก้ปัญหา แอ้ดมินครับ ช่วยด้วยครับ เรื่อง สไลค์ให้ทำงานตามที่เซิฟกำลังทำงานครับ

แอ้ดมินครับ ช่วยด้วยครับ เรื่อง สไลค์ให้ทำงานตามที่เซิฟกำลังทำงานครับ

 ถ้าเราจะทำสไลค์ให้แสดงผลตามที่ฐานข้อมูลกำลังทำงาน
เช่น ฐานข้อมูลกำลังแสดงสไลค์ลำดับที่ 5 เวลาคนเข้าเว็บใหม่
สไลค์จะไม่เริ่มอันดับที่1ก่อน แต่จะเริ่มจากลำดับที่5 ตามที่ฐานข้อมูลกำลังทำงาน
แบบนี้ ทำได้หรือไม่ครับ ทำอย่างไรครับผม

นี้ครับเว็บผม http://www.gazeboon.com/ ใช้สไลค์ เจคิวรี่

นี้ลิ้งเฟรมสไลค์ครับผม http://www.gazeboon.com/IFrame/Slide/Slide.php

 



Gazeboon 110.77.212.xxx 28-05-2013 16:44:02

คำแนะนำ และการใช้งาน

สมาชิก กรุณา ล็อกอินเข้าระบบ เพื่อตั้งคำถามใหม่ หรือ ตอบคำถาม สมาชิกใหม่ สมัครสมาชิกได้ที่ สมัครสมาชิก


  • ถาม-ตอบ กรุณา ล็อกอินเข้าระบบ
  • เปลี่ยน


    ( หรือ เข้าใช้งานผ่าน Social Login )

 ความคิดเห็นที่ 1

 แก้โดยในไฟล์ number_slideshow.js

ต่อจากบรรทัด 
var s_l_g=p&&p.slideshow_loading_gif?p.slideshow_loading_gif:"loading.gif";
 
ให้เพิ่มบรรทัด ตัวแปรสำหรับรับค่าไสลด์ เริ่มต้นเข้าไป
var E=p&&p.slideshow_start_slide?p.slideshow_start_slide:"0";
 
และก็ให้ลบบรรทัด
var E=0;
 
ออก
 
ส่วนไฟล์ที่นำไปใช้
ก็ให้เพิ่ม การกำหนดค่าเริ่มต้นว่าต้องการเริ่มที่ไสลด์ไหนลงไป โดยเริ่มที่ 0 คือตัวแรก
ถ้าต้องการเริ่มตัวที่ 5 ก็กำหนดเป็นเลข 4 โดยค่าตัวเลขก็ดึงจากฐานข้อมูลมาแสดงได้เลย
slideshow_start_slide:4
 
 
ตัวอย่างการเพิ่ม
 
$("#number_slideshow").number_slideshow({
    slideshow_autoplay: "enable",//enable disable
    slideshow_time_interval: 3000,
    slideshow_window_background_color: "#fff",
    slideshow_window_padding: "1",
    slideshow_window_width: "550",
    slideshow_window_height: "332",
    slideshow_border_size: "1",
    slideshow_transition_speed: 500, //"normal","slow","fast" or numeral
    slideshow_border_color: "black",
    slideshow_show_button: "enable",//enable disable
    slideshow_show_title: "disable",//enable disable
    slideshow_button_text_color: "#CCC",
    slideshow_button_current_text_color: "#000",
    slideshow_button_background_color: "#333",
    slideshow_button_current_background_color: "#666",
    slideshow_button_border_color: "#000",
    slideshow_loading_gif: "loading.gif",//loading pic, you can replace it.
    slideshow_button_border_size: "1",
    slideshow_start_slide:4
});
ถ้าดึงจากฐานข้อมูลแล้วเก็บเป็นตัวแปร ก็สามารถนำมาแสดงได้เป็น
 
$("#number_slideshow").number_slideshow({
    slideshow_autoplay: "enable",//enable disable
    slideshow_time_interval: 3000,
    slideshow_window_background_color: "#fff",
    slideshow_window_padding: "1",
    slideshow_window_width: "550",
    slideshow_window_height: "332",
    slideshow_border_size: "1",
    slideshow_transition_speed: 500, //"normal","slow","fast" or numeral
    slideshow_border_color: "black",
    slideshow_show_button: "enable",//enable disable
    slideshow_show_title: "disable",//enable disable
    slideshow_button_text_color: "#CCC",
    slideshow_button_current_text_color: "#000",
    slideshow_button_background_color: "#333",
    slideshow_button_current_background_color: "#666",
    slideshow_button_border_color: "#000",
    slideshow_loading_gif: "loading.gif",//loading pic, you can replace it.
    slideshow_button_border_size: "1",
    slideshow_start_slide:<?=$startSlide?>
});
 


Ninenik Narkdee 14.207.6.xxx 29-05-2013
 ความคิดเห็นที่ 2

ขอบคุณครับสำหรับคำตอบแต่..

โทษน่ะครับพอดีผมอักเดทสไลค์ เวอร์ชั่นใหม่ล่าสุดครับครับ ลิ้งนี้

 http://www.gazeboon.com/IFrame/Slider/Slider.php

ต้องแก้ไขอย่างไรบ้าง และสร้างฐานข้อมูลอะไรยังไงบ้างครับ

ถึงทำให้มีฐานข้อมูลที่สไลค์กำลังทำงาน และอย่างที่พิมพ์ไว้ตอนตั้งกะทู้ ว่าทำสไลค์อย่างไร

ให้ทำงานตามที่ฐานข้อมูลกำลังทำงาน ต้องรบกวนแอ้ดมินแล้วน่ะครับ 

จำเป็นมาก เพราะผมไม่ค่อยเก่งเรื่องสร้างเว็ลบ พึ้งหัดเรียน ต้องรบกวนแอ้ดมิน ลำบากสอนคนหัดเดิน

รบกวนด้วยน่ะครับ ทำคลิปมายิ่งดีครับผม 



gazeboon 110.77.194.xxx 31-05-2013 19:39






เว็บไซต์ของเราให้บริการเนื้อหาบทความสำหรับนักพัฒนา โดยพึ่งพารายได้เล็กน้อยจากการแสดงโฆษณา โปรดสนับสนุนเว็บไซต์ของเราด้วยการปิดการใช้งานตัวปิดกั้นโฆษณา (Disable Ads Blocker) ขอบคุณครับ