21
avtx30
Re: Shorter Friendlier URL
  • 2008/6/3 3:43

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


Did you really find the answer??

readme
Xoops Demos:
http://www.nhatban.net/info/a0021.html



22
avtx30
Re: SmartFAQ won't work with XOOPS search
  • 2008/6/1 23:12

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


Hi tvn,

Replace modules/smartfaq/include/search.inc.php with these codes (thanks to photositelinks.com)

<?php
// $Id: search.inc.php,v 1.0 2007/06/10 21:29:00 photosite
// FILE        ::    search.inc.php
// AUTHOR    ::    photosite
// WEB        ::    Photo Site Links <http://www.photositelinks.com/>
//
function smartfaq_search($queryarray$andor$limit$offset$userid)
{
    global 
$xoopsDB ;
        
$showcontext = isset( $_GET['showcontext'] ) ? $_GET['showcontext'] : ;
    if( 
$showcontext == 1){
        
$sql "SELECT f.faqid, f.categoryid, f.question, f.datesub, f.status, a.answer, a.uid FROM ".$xoopsDB->prefix("smartfaq_faq")." f LEFT JOIN ".$xoopsDB->prefix("smartfaq_answers")." a ON f.faqid = a.faqid WHERE ( f.status = 5 OR f.status = 6 )";
    }else{
        
$sql "SELECT f.faqid, f.categoryid, f.question, f.datesub, f.status, a.uid FROM ".$xoopsDB->prefix("smartfaq_faq")." f LEFT JOIN ".$xoopsDB->prefix("smartfaq_answers")." a ON f.faqid = a.faqid WHERE ( f.status = 5 OR f.status = 6 )";
    }
    if ( 
$userid != ) {
        
$sql .= " AND a.uid=".$userid." ";
    }
    
// because count() returns 1 even if a supplied variable
    // is not an array, we must check if $querryarray is really an array
    
if ( is_array($queryarray) && $count count($queryarray) ) {
        
$sql .= " AND ((f.question LIKE '%$queryarray[0]%' OR a.answer LIKE '%$queryarray[0]%')";
        for(
$i=1;$i<$count;$i++){
            
$sql .= $andor ";
            
$sql .= "(f.question LIKE '%$queryarray[$i]%' OR a.answer LIKE '%$queryarray[$i]%')";
        }
        
$sql .= ") ";
    }
    
$sql .= "ORDER BY f.datesub DESC";
    
// get twice records 
    
$result $xoopsDB->query($sql2*$limit$offset);
    
    
$module_handler = &xoops_gethandler('module');
    
$module $module_handler->getByDirname('smartfaq');
    
$mid    $module->getVar('mid');

    
$gperm_handler = &xoops_gethandler('groupperm');

    global 
$xoopsUser;
    if ( 
is_object($xoopsUser) )
    {
        
$groups $xoopsUser->getGroups();
    }
    else
    {
        
$groups XOOPS_GROUP_ANONYMOUS;
    }

    
$ret = array();
    
$i 0;
    
    
$myts =& MyTextSanitizer::getInstance();
    
    while(
$myrow $xoopsDB->fetchArray($result) )
    {
        
$faqid $myrow['faqid'];
        
$catid $myrow['categoryid'];
        
// permission
        
if ( !$gperm_handler->checkRight('category_read'$catid$groups$mid) )
        {
            continue;
        }

        if ( !
$gperm_handler->checkRight('item_read'$faqid$groups$mid) )
        {
            continue;
        }
        
        
$ret[$i]['image'] = 'images/smartfaq.gif';
        
$ret[$i]['link']  = 'faq.php?faqid='.$myrow['faqid'];
        
$ret[$i]['title'] = $myts->htmlSpecialChars($myrow['question']);
        
$ret[$i]['time']  = $myrow['datesub'];
        
$ret[$i]['uid']   = $myrow['uid'];
        if( 
function_exists'search_make_context' ) && ! empty( $_GET['showcontext'] ) ) {
            
$context $myrow['answer'];
            
$context strip_tags($myts->displayTarea(strip_tags($context)));
            
$ret[$i]['context'] = search_make_context($context,$queryarray);
        }
        
$i++;

// show twice of limit
        
if (($limit 0) && ($i >= $limit))  break;
    }

    return 
$ret;
}

?>
Xoops Demos:
http://www.nhatban.net/info/a0021.html



23
avtx30
Re: help sitemap google
  • 2008/5/30 11:00

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


Thanks for your response.

Yes, I did try different browsers: Firefox 3.0rc1, IE7. The results are the same: cannot delete the unwanted sitemap (modules/sitemap/xml_google.php)
Xoops Demos:
http://www.nhatban.net/info/a0021.html



24
avtx30
Re: help sitemap google
  • 2008/5/30 3:27

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


It does not work for me. The "Delete Selected" button seems to be for togging Selected/Unselected only (?)
Xoops Demos:
http://www.nhatban.net/info/a0021.html



25
avtx30
Re: help sitemap google
  • 2008/5/29 22:52

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


It's me again.

How do you remove the modules/sitemap/xml_google.php from google webmaster center?

TIA
Xoops Demos:
http://www.nhatban.net/info/a0021.html



26
avtx30
Re: help sitemap google
  • 2008/5/29 14:38

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


I am using sitemap 1.30 too. (from GIJOE's site)

You are showing me the usage of XOOPS_URL/xml_google.php. It's ok. I known this.

I wanted to know if it's really OK with the XOOPS_URL/modules/sitemap/xml_google.php. I want to confirm that what you stated in the post #3 of this thread is not true.

Thanks
Xoops Demos:
http://www.nhatban.net/info/a0021.html



27
avtx30
Re: help sitemap google
  • 2008/5/28 12:39

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


Hi Mowaffak,

I've just tried to use the XOOPS_URL/modules/sitemap/xml_google.php as site map. Failed!

Google said
Quote:

Last downloaded by Google May 27, 2008
Status Errors
Total URLs in Sitemap 0
Indexed URLs in Sitemap Help

Sitemap errors and warnings
Line Status Details
Details - Unsupported file format
Your Sitemap does not appear to be in a supported format. Please ensure it meets our Sitemap guidelines and resubmit.


Are you sure that file for adding to google webmaster center not for direct browsing.??

I don't see the difference between directly browsing and google's crawling. The return must be the same, i.e. Don't call this file directly
Xoops Demos:
http://www.nhatban.net/info/a0021.html



28
avtx30
Re: help sitemap google
  • 2008/5/26 3:26

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


Thanks, I am going to try it later.
Xoops Demos:
http://www.nhatban.net/info/a0021.html



29
avtx30
Re: help sitemap google
  • 2008/5/26 3:06

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


Hi Mowaffak,

Thanks for the tip.

What did you change to the xml_google.php in order to make it can be directly accessed viahttp://www.mysite.com/modules/sitemap/xml_google.php

Without modification it said
Quote:

Don't call this file directly


TIA
Xoops Demos:
http://www.nhatban.net/info/a0021.html



30
avtx30
Re: Help needed to change modules path
  • 2008/5/25 21:16

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


The last 'extra' commas work for me. Note that my sample is the working one (with the 'extra' commas):

htaccess:http://www.nhatban.net/tmp/htaccess.txt
mainfile.php:http://www.nhatban.net/tmp/mainfile.txt

Hi efrael,

What do you mean the hack did not work for you? What happens?

Before talking about the mainfile.php, let's see if the .htaccess really works. Can you access your site via:

- yousite.com/linksutili/
- yousite.com/terapia/
- yousite.com/main.css
- yousite.com/include/main.js
Xoops Demos:
http://www.nhatban.net/info/a0021.html




TopTop
« 1 2 (3) 4 5 6 ... 18 »



Login

Who's Online

157 user(s) are online (104 user(s) are browsing Support Forums)


Members: 0


Guests: 157


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits