Joomla อยากได้โค๊ดที่ทำให้ new เลิกกระพริบในหน้าเว็บไซต์เมื่อครบกำหนด

เริ่มโดย takaeshi, 15 กันยายน 2013, 08:08:00

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

takaeshi

ใช้เว็บไซต์  joomla อยู่ครับ  และใช้โมดูล News Pro gk4  ซึ่งได้ใส่โค๊ดให้ new กระพริบประกอบข่าวไว้และฝังไว้ใน template.css แล้ว  แต่ new  ตัวนี้มันแสดงตลอดเวลา  ถ้าอยากให้เมื่อพ้น 5 วันนับจากวันเผยแพร่บทความ  แล้วให้เลิกแสดง ต้องเขียนโค๊ดกำกับอย่างไรครับ  ขอบคุณครับ

smapan

เมื่อพ้น 5 วัน -> unpublished module


กำหนดตรง finish publishing ครับ
[direct=http://cp.siamhostweb.com/cart.php?gid=1]จูมล่าโฮส สยามโฮสเว็บ[/direct] [direct=http://www.modty.com]modty.com[/direct]
[direct=http://www.apartment.in.th]รวมที่พัก เช่ารายวัน ที่พักเช่ารายเดือนมากที่สุดแจ่มจริง[/direct]
***Tel 083-757-1515 ติดปัญหา Joomla ตรงไหนรับปรึกษาฟรี โทรมาเถอะครับ ถ้าตอบได้ช่วยแน่นอน ไม่มีกั้ก. ***

takaeshi

หมายถึง บทความยังอยู่ในหน้าเว็บ  แต่แค่ให้ new ออกน่ะครับ

takaeshi

ไม่ทราบว่ามีวิธีหรือเปล่าครับ  ตอนนี้ใช้โค๊ดฝังที่ template.css  โดยอ้างพาทที่อัพไฟล์ .gif ไว้  แต่มันแสดงตลอด อยากให้ new  หรือ update  มันเลิกแสดงเอง  เมื่อผ่าน 5 วัน  หรือ 10  วันครับ  รบกวนแนะนำโค๊ดหน่อยครับ  ขอบคุณครับ

smapan

[direct=http://cp.siamhostweb.com/cart.php?gid=1]จูมล่าโฮส สยามโฮสเว็บ[/direct] [direct=http://www.modty.com]modty.com[/direct]
[direct=http://www.apartment.in.th]รวมที่พัก เช่ารายวัน ที่พักเช่ารายเดือนมากที่สุดแจ่มจริง[/direct]
***Tel 083-757-1515 ติดปัญหา Joomla ตรงไหนรับปรึกษาฟรี โทรมาเถอะครับ ถ้าตอบได้ช่วยแน่นอน ไม่มีกั้ก. ***

phpwin

อ้างถึงจาก: takaeshi ใน 16 กันยายน 2013, 10:55:09
ไม่ทราบว่ามีวิธีหรือเปล่าครับ  ตอนนี้ใช้โค๊ดฝังที่ template.css  โดยอ้างพาทที่อัพไฟล์ .gif ไว้  แต่มันแสดงตลอด อยากให้ new  หรือ update  มันเลิกแสดงเอง  เมื่อผ่าน 5 วัน  หรือ 10  วันครับ  รบกวนแนะนำโค๊ดหน่อยครับ  ขอบคุณครับ
อาจจะต้องเข้าไปแก้ที่ตัว โมดุล News Pro gk4 ครับ แต่ผมยังไม่ได้ลองใช้เลยครับ เลยบอกโค๊ดให้ไม่ได้  :-X
รอผู้รู้มาตอบครับ
[direct=http://php-for-ecommerce.blogspot.com]สอน PHP ร้านค้าออนไลน์[/direct]  [direct=http://php-for-ecommerce.blogspot.com/p/blog-page.html]รับทำเว็บไซต์ ร้านค้าออนไลน์ ราคาถูก[/direct] #รับแก้ไขเว็บไซต์ #รับปรับแต่ง Open Cart #รับปรับแต่งเว็บไซต์ให้ไวติดจรวด #ขายเว็บไซต์เช็คราคาสินค้าแบบเทพๆ lnwprice.com

lungkao

มันต้องเขียน code  กันยาวเลย
ตัวอย่าง
if (!isset($article->publish_up) ) return;

$created = explode(" ", $article->publish_up);
$c_date = explode("-",$created[0]);
$c_time = explode(":",$created[1]);
$modified = explode(" ",$article->modified);
$m_date = explode("-",$modified[0]);
$m_time = explode(":",$modified[1]);

$nowdate = mktime(date('h'),date('i'),date('s'),date('m'), date('d'), date('Y'));

$c_time[0] = (int)$c_time[0];
$m_time[0] = (int)$m_time[0];
$c_date[0] = (int)$c_date[0];
$m_date[0] = (int)$m_date[0];

$c_day = mktime($c_time[0],$c_time[1],$c_time[2],$c_date[1], $c_date[2],$c_date[0]);
$m_day = mktime($m_time[0],$m_time[1],$m_time[2],$m_date[1], $m_date[2],$m_date[0]);

$c_day=ceil(($nowdate-$c_day)/86400);
$m_day=ceil(($nowdate-$m_day)/86400);

$new_img = $this->params->get('new_image');
$update_img = $this->params->get('update_image');
$selectnew = $this->params->get('selectnew');
$newself = $this->params->get('newself');
$selectupdate = $this->params->get('selectupdate');
$updateself = $this->params->get('updateself');


if(($c_day<=$this->params->get('lifetime_new'))&&($m_day<=$this->params->get('lifetime_update')) && $article->publish_up != $article->modified )


ไปแกะเองละกันครับ
[direct=http://colorpack.co.th] รับทำเว็บ joomla [/direct] | [direct=http://joomlachannel.com] ตอบปัญหา joomla [/direct] | [direct=http://rider.in.th/] จักรยาน [/direct] | [direct=https://pokemontrainer.in.th/\] โปเกมอน โก[/direct]

takaeshi

อ้างถึงจาก: lungkao ใน 18 กันยายน 2013, 10:41:00
มันต้องเขียน code  กันยาวเลย
ตัวอย่าง
if (!isset($article->publish_up) ) return;

$created = explode(" ", $article->publish_up);
$c_date = explode("-",$created[0]);
$c_time = explode(":",$created[1]);
$modified = explode(" ",$article->modified);
$m_date = explode("-",$modified[0]);
$m_time = explode(":",$modified[1]);

$nowdate = mktime(date('h'),date('i'),date('s'),date('m'), date('d'), date('Y'));

$c_time[0] = (int)$c_time[0];
$m_time[0] = (int)$m_time[0];
$c_date[0] = (int)$c_date[0];
$m_date[0] = (int)$m_date[0];

$c_day = mktime($c_time[0],$c_time[1],$c_time[2],$c_date[1], $c_date[2],$c_date[0]);
$m_day = mktime($m_time[0],$m_time[1],$m_time[2],$m_date[1], $m_date[2],$m_date[0]);

$c_day=ceil(($nowdate-$c_day)/86400);
$m_day=ceil(($nowdate-$m_day)/86400);

$new_img = $this->params->get('new_image');
$update_img = $this->params->get('update_image');
$selectnew = $this->params->get('selectnew');
$newself = $this->params->get('newself');
$selectupdate = $this->params->get('selectupdate');
$updateself = $this->params->get('updateself');


if(($c_day<=$this->params->get('lifetime_new'))&&($m_day<=$this->params->get('lifetime_update')) && $article->publish_up != $article->modified )


ไปแกะเองละกันครับ
ขอบพระคุณครับ  ว่างภารกิจจะลองอีกซักตั้ง  เพราะผมว่าวิธีแสดงข่าวใน Joomla  วิธีนี้น่าจะถูกต้องที่สุดแล้ว   ถ้าไม่อยากทำแบบ Custom  โมดูล โดยสร้างเนื้อหามาเป็นโมดูลแสดงหน้าแรก   แต่วิธีนี้เราต้องแก้ไขเนื้อหานี้ พร้อมย้ายไฟล์ new.gif  นี้ตลอดเวลา  และต้องสร้างลิงค์ให้ด้วยครับ