ปัญหาการติดตั้ง component ใน joomla 2.5 (1)

เมื่อติดตั้ง component ใน joomla 2.5 แล้วขึ้นข้อความ

JFolder::create: Path not in open_basedir paths         Warning: Failed to move file!

ให้แก้ไขตามนี้

วิธีการแก้ไข JFolder::create: Path not in open_basedir paths ของ Joomla

ขั้นต้น
เปลี่ยน Permission Folder
/public_html/logs และ /public_html/tmp
ให้เป็น 777

ถ้ายังไม่ได้
ให้แก้ไขไฟล์ /libraries/joomla/filesystem/folder.php
ค้นหา และใส่ comment (//) ที่
//  $obd = ini_get('open_basedir');

ติดตั้ง conponent ได้แล้ว อย่าลืม คืนค่า permission ของ /public_html/logs และ /public_html/tmp ให้เป็นค่าเดิมด้วย

ถ้ายังไม่ได้ผล 
นี่คือวิธีล่าสุดที่เจอจาก http://www.webtechriser.com/tutorials/82-joomla-3-0/83-fixing-jfolder-create-path-not-in-open-basedir-paths

ได้ผลทันที ลง plugin และ component ได้ ***แก้ไขปัญหาตรงจุดจริงๆ****


Goto this file: /libraries/joomla/filesystem/folder.php and edit it .

Find the following line:
$obd = ini_get('open_basedir');

And then comment it out like this
 //$obd = ini_get('open_basedir');

This is a Joomla!'s core file hack. If this file (folder.php) is replaced on the next Joomla! update, these changes will be lost. In that case, you need to redo it.

 

ป้องกันการ copy ใน wordpress

ใส่ code ข้างล่างนี้ที่ template theme ใน wordpress โดยเลือกจากเมนูซ้ายมือ รูปแบบบล็อก > การแก้ไข theme  แล้วเลือกรายการ ส่วนหัว (header) ที่เมนูขวามือ เข้าไปแก้ header.php  Ffp หำฟพแ้ หา <header> หรือ </header> เพราะต้องวาง code ข้างล่างไว้ระหว่าง <header> ..... </header>

<!-- Copyright protection script -->
<meta http-equiv="imagetoolbar" content="no">
<script language="Javascript">
/*<![CDATA[*/
document.oncontextmenu = function(){return false;};
/*]]>*/
</script>
<script type="text/javascript">
/*<![CDATA[*/
document.onselectstart=function(){
    if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
        return false;
    }
    else {
         return true;
    }
};
if (window.sidebar) {
    document.onmousedown=function(e){
        var obj=e.target;
        if (obj.tagName.toUpperCase() == 'SELECT'
            || obj.tagName.toUpperCase() == "INPUT"
            || obj.tagName.toUpperCase() == "TEXTAREA"
            || obj.tagName.toUpperCase() == "PASSWORD") {
            return true;
        }
        else {
            return false;
        }
    };
}
document.body.style.webkitTouchCallout='none';
/*]]>*/
</script>
<script type="text/javascript" language="JavaScript1.1">
/*<![CDATA[*/
if (parent.frames.length > 0) { top.location.replace(document.location); }
/*]]>*/
</script>
<script language="Javascript">
/*<![CDATA[*/
document.ondragstart = function(){return false;};
/*]]>*/
</script>
<style type="text/css">
<!—-
    * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
    }

    img {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
    }
-->
</style>
<!-- End Copyright protection script -->


การใส่ code ป้องกันการ copy อาจมีผลต่อการทำ seo ทำให้ต้องส่ง sitemap กับ webmaster บ่อยๆ

ลบข้อความ disable comment ใน wordpress

หลังจากปิด comment  comment box เพื่อหม่ให้มีการแสดงความคิดเห็นใน post แล้ว
template บางแบบจะขึ้น กรอบข้อความประเภท

การปิด ให้ไปที่ การแก้ไข theme

เลือกแก้ไข ความเห็น

ปิดคำสัง่แสดงข้อความด้วยเครื่องหมาย // หน้าบรรทัดนั้นๆ

แก้ไขหน้า security risk ใน virtuemart

ตอนที่สร้างเว็บ joomla 2.5 + virtuemart 2+ เมื่อทดสอบการทำงานแล้วพบปัญหา กดบางปุ่มบน fronend ของ virtuemart แล้ว เข้าสู่หน้า Untrust connection
เช่น ทดลองระบบสั่งซื้อสินค้า แล้ว กดปุ่มเลือกวิธีการจัดส่ง


กลับเป็นการเข้าไปที่ หน้า This connection is Untrust


ให้เข้าไปแก้ ที่ configuration ของ vituemart ตรง tab ร้านค้า


เอาติ๊กถูก ออกจาก check box หลัง ข้อความ
เปิดใช้งานระบบ SSL สำหรับพื้นที่ส่วนที่ต้องการความปลอดภัยสูง (แนะนำให้ใช้งาน) 

อย่างไรก็ตามมีคำเตือนเกี่ยวกับการไม่ใช้ option นี้ ที่เกี่ยวข้องกับการตั้งค่าใน joomla คือ

ดังนั้น หลังจาก run ระบบ และทดลองการส่งซื้อแล้ว ควรเช็คอีกครั้งว่า ถ้าเลือก option นี้ จะยังมีปัญหาเปิดหน้า This connection is Untrust อีกหรือไม่

แก้ไข รูป thumbnail ของ default template virtuemart

การแก้ไข รูป thumbnail ของ default template virtuemart ที่มีขนาดเล็กกว่าที่เราต้องการ และกำหนดไว้ใน backend
ต้องแก้ไขตามขั้นตอนที่แนะนำใน
http://www.webholism.com/blog/sara/virtuemart-2-0-how-to-change-the-thumbnail-size-of-your-products/
ดังนี้

VirtueMart 2.0 – How to Change the Thumbnail Size of Your Products

Below are the instructions to change the size of your product thumbnails to the size you really want:
Go to Components -> VirtueMart

Click the Configuration button

In the Templates tab, tick the Enable Dynamic Thumbnail Resizing? box and set Thumbnail Image Width and Thumbnail Image Height to your desired values
Save & Close

Using FTP, browse to your /images/stories/virtuemart/product and /images/stories/virtuemart/category folders, and delete the resized folder

Create a new folder structure: /templates/YOUR-TEMPLATE/html/com_virtuemart/category

Copy the file \components\com_virtuemart\views\category\tmpl\default.php and place the copy in /templates/YOUR-TEMPLATE/html/com_virtuemart/category

Open /templates/YOUR-TEMPLATE/html/com_virtuemart/category/default.php

Change div class=”width30 floatleft center” to div class=”width100 floatleft center” and change div class=”width70 floatright” to div class=”width100 floatright center”

Add the following code to your template CSS file: .browse-view .row .product .spacer img, .related-products-view .row .product .spacer img{max-width:100%;}
Admire your handiwork.


ทำตามขั้นตอนนี้ ได้ผลจริง ไฟลื thumbnail เปลี่ยนจากขนาดประมาณ 50x50 px เป็น 120x120 px ตามต้องการ 

product ไม่แสดงใน catergory virtuemart 2

วิธีที่ 1 จาก http://www.cheubake.com/joomla/20-how-to-get-virtuemart-category-product-image-to-link-to-product-page

How to get Virtuemart category product image to link to product page


After a lot of people having a issue with this. Here's a little helper on how to get Virtuemart category product image to link to product page.
You have to create a folder into your Joomla template:

/templates/your_template/html/com_virtuemart/

after that you should copy all default.php files from:
components/com_virtuemart/views/category/view.html.php
You then need to place in the your template and changing the name to default.php
/templates/your_template/html/com_virtuemart/default.php

You need to change this bit of code:
<?php /** @todo make image popup */ echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',false,'class="modal"');?>
to
<?php echo JHTML::_('link', JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id),$product->images[0]->displayMediaThumb('class="catImage" border="0"',false));
                  ?>
If you still seem to be having problems with this. You might have a template override in the /html/ folder.
Get in touch if you have any issues.

วิธีนี้ทดลองแล้ว ไม่ได้ผล สุดท้ายใช้การ uninstall virtuemart ออกจากส่วนเสริมทั้งหมดแล้วลงใหม่ ได้ผล เพราะพอ run ปุ๊บ รูป product ขึ้นได้ตามปกติ

การ uninstall virtuemart ออก โดยไปที่ extension manager  เลือก ชนิดเป็น virtuemart แล้ว ย้ายไปถังขยะให้หมด search เพิ่มด้วยคำว่า vm ถ้ายังมีอยู่ ให้ลบออกหมด เช่นกัน แล้ว upload and install virtuemart package ลงไปใหม่

ภาพใน joomla หาไม่เจอใน google

หลังจากส่งเว็บไซต์ที่สร้างด้วย joomla ขึ้นโฮสต์ ทำ sitemap ให้ google รู้จัก ก็ตั้งตาคอยว่าเมื่อไหร่เว็บเราจะถูกพบโดย google

โดยทั่วไปถ้าไม่หลงลืมขั้นตอนสำคัญ และใน google.com/webmaster แสดงการ index เว็บไซต์เราบ้างแล้ว  ก็จะ search เจอ ภายใน 2-3 วัน  หรือถ้ายังไม่เจอ ก็ลอง search ด้วยคำว่า site: ตามด้วยชื่อโดเมนของเรา เขียนให้ติดกัน เช่น site:YourDomain.com  ถ้ามีรายการเว็บเราแสดงขึ้นมา แสดงว่า robot มาเก็บข้อมูลเราไปแล้ว คราวนี้ก็ใช้ยุทธวิธีทาง seo ดันเว็บเราให้ขึ้นมาหน้าแรกๆ ของ google กันต่อไป

ปัญหาที่เกิดขึ้นและมีการถามบ่อยกว่า คือ ทำไม หน้าเว็บเรา search เจอใน google ตั้งนาน แล้ว แถมอันดับก็ดีพอสมควร แต่ทำไมรูปที่มีอยู่ในเว็บไซต์ทั้งหมดไม่เห็นแสดงใน google image เลย ทั้งที่ภาพก็ใส่ Alt text ไว้แล้ว เพื่อให้ robot รู้จักภาพว่าเกี่ยวข้องกับอะไร

เพิ่มเว็บใน google analytics

 สำหรับผู้ที่มีบัญชี google analytics และเคย add website เข้าไปแล้ว
- login เข้าgoogle analytics ตามปกติ
- ไปที่เมนูด้านบน "ผู้ดูแลระบบ"
- หน้านี้จะมี 3 คอลัมน์ ซ้ายมือเป็นคอลัมน์หลัก ถัดเป็นคอลัมน์ย่อยของคอลัมน์หลัก
- คลิกตรงชื่อเว็บที่มีอยู่ในคอลัมน์หลัก จะมี dropdown menu ให้ "สร้างบัญชีใหม่"
- เข้าไปที่หน้าบัญชีใหม่ ใส่ชื่อของเว็บไซต์ที่ต้องการติดตาม
- ใส่ชื่อบัญชี ตั้งชื่อได้เอง เป็นชื่อบัญชีหลักของเว็บ (ในแต่ละ account ของ google analytics มีได้หลายบัญชี)
- ใส่ชื่อเว็บไซต์ ตั้งชื่อได้เอง เป็นชื่อเรียกเว็บไซต์ที่อยู่ในบัญชี  (แต่ละบัญชี อาจมีได้หลายเว็บไซต์ที่เกี่ยวข้องกัน เช่น หมวดหมู่ใกล้เคียงกัน หรือเป็นเว็บ subdomain หรือ subdirectory)
- ใส่ชื่อ url ของเว็บไซต์
- เลือกหมวดหมู่อุตสาหกรรม
- เลือกเขตเวลา
- กดรับรหัสการติดตาม

- ยอมรับข้อกำหนด google
- รับ code ติดตามที่เป็น script html ไปใส่ใน template ของเว็บไซต์ หรือเฉพาะ page ที่ต้องการติดตาม

การนำโค๊ดติดตามไปใส่ใน web ที่สร้างด้วย Joomla
- ไปที่โปรแกรม ftp ที่ใช้อยู่ เช่น Filezilla
-  login เข้า host ไปที่ Domain ที่ต้องการติด Code

ใส่ code ห้าม copy บน blog

เมื่อเขียน blog แล้ว มีภาพหรือข้อมูลที่ไม่ต้องการให้ใครมาคลิกขวาเพื่อ copy หรือลากเมาส์คลุมดำแล้ว copy ให้ใส่ code html ต่อไปนี้ลงในหน้า html ของ post หรือ template ของ blog

1. ห้าม copy บาง post
ให้ copy code วางที่หน้า html ของแต่ละ post ให้อยู่ระหว่าง  <body> …. </body>

2. ห้าม copy ทั้ง blog
ให้ copy code วางใน template ของ blog ให้อยู่ระหว่าง  <body> …. </body>   เพื่อห้าม copy และลากดำทั้ง blog


ห้ามคลิกขวาและลากเมาส์คลุมข้อความ  <script language='javascript'>
document.onselectstart=new Function('return false');
function ds(e){return false;}  function ra(){return true;}  document.onmousedown=ds;  document.onclick=ra;
document.oncontextmenu = function (){ return false};
</script>
<br />
<br />
<script language='JavaScript'>
 if (top.location != self.location)  {top.location = self.location}
</script>

ห้ามลากเมาส์คลุมข้อความ
<script language='javascript'>
document.onselectstart=new Function('return false');
function ds(e){return false;}  function ra(){return true;}  document.onmousedown=ds;  document.onclick=ra;
</script>
<br />
<br />
<script language='JavaScript'>  if (top.location != self.location)  {top.location = self.location}
</script>