Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 10:38 am EST

Geeklog Forums

Error with External Pages and Geeklog 1.5


Orion

Anonymous
I am running Geeklog 1.5 with Chameleon layout but I checked and these errors occur when using the professional layout too.

One error is when you try to use the main search feature. The error I get is:

2 - file(path to public_html) [function.file]: failed to open stream: No such file or directory @ path to geeklog installation\plugins\external\functions.inc line 193

The second error is when you are viewing a users profile and click on the "Find all postings by username" link. The error I get is:

2 - stristr() [function.stristr]: Empty delimiter @ path to geeklog installation\plugins\external\functions.inc line 194

Here is the code for the function giving the error:

Text Formatted Code
function plugin_dopluginsearch_external($query, $datestart, $dateend, $topic, $type, $author)
{
        global $_TABLES, $_CONF, $LANG_EX00;

    if (empty($type)) {
        $type = 'all';
    }

    // Bail if we aren't supppose to do our search
    if ($type <> 'all' AND $type <> 'external') {
        $plugin_results = new Plugin();
        $plugin_results->plugin_name = 'external';
        $plugin_results->searchlabel = $LANG_EX00['externpages'] . $LANG_EX00['results'];
        return $plugin_results;
    }

    // Build search SQL - Modified to exclude static PHP pages from search.
    $sql = "SELECT * from " . $_TABLES['external'];
    $result = DB_query($sql);

   
    // OK, now create new plugin object and insert table header labels
    require_once($_CONF['path_system'] . 'classes/plugin.class.php');
    $plugin_results = new Plugin();
    $plugin_results->plugin_name = 'external';
    $plugin_results->searchlabel = $LANG_EX00['externpages'] . $LANG_EX00['results'];
    $plugin_results->addSearchHeading($LANG_EX00['titlemsg']);
    $plugin_results->addSearchHeading($LANG_EX00['urlmsg']);
    $plugin_results->addSearchHeading($LANG_EX00['hitsmsg']);
    $mycount = DB_numRows($result);

    // NOTE if any of your data items need to be links then add them here!
    // make sure data elements are in an array and in the same order as your
    // headings above!
        for ($i = 1; $i <= $mycount; $i++) {
        $A = DB_fetchArray($result);

        if(SEC_hasAccess($A[owner_id],$A[group_id],$A[perm_owner],$A[perm_group],$A[perm_members],$A[perm_anon])){
            if (preg_match("/^(http:\/\/)/i",$A['url']) == 1) {
                $pth = $A['url'];
                $url = $A['url'];
            } else {
                $pth = $_CONF['path_html'] . $A['url'];
                $url = $_CONF['site_url'] . '/' . $A['url'];
            }
 [line 193]           $cnts = implode('',file($pth));
 [line 194]           if (stristr($cnts,$query) != '') {
                $rcnt++;
                $A['title'] = stripslashes($A['title']);
                $row = array($A['title'],
                      '<a href="' . $url . '">' . $A['url'] . "</a>",
                     $A['hits']);
                $plugin_results->addSearchResult($row);
            }
            }
       
        }
    $plugin_results->num_searchresults = $rcnt;
    $plugin_results->num_itemssearched = DB_count($_TABLES['external']);

    return $plugin_results;
}



I run a radio station program called SAMS Broadcaster which has a php based website. I use External Pages to integrate this site into the CMS so unless someone knows of a plugin (or is willing to create one) that will integrate SAMS Broadcaster's website into the Geeklog 1.5 CMS, getting External Pages to work with Geeklog 1.5 is very important to me.

Any help would be greatly appreciated.

Thanks,
John Orion
 Quote

Status: offline

mst3kroqs

Forum User
Regular Poster
Registered: 10/18/05
Posts: 78
Location:Cary, NC USA
Quote by: Orion

I am running Geeklog 1.5 with Chameleon layout but I checked and these errors occur when using the professional layout too.

...

Any help would be greatly appreciated.

Thanks,
John Orion


FWIW - chameleon-1.0.1-1.4.1 is not compatible with Geeklog 1.5.0, although I do not believe that this is the source of your problem.

Further than that - I don't have any constructive suggestions in that regard, but recommend that you utilize the professional theme 'shipped' with 1.5.0 for troubleshooting purposes. A chameleon update for 1.5.0 is being tested now ...

-m
 Quote

Status: offline

mst3kroqs

Forum User
Regular Poster
Registered: 10/18/05
Posts: 78
Location:Cary, NC USA
Quote by: Orion


I run a radio station program called SAMS Broadcaster which has a php based website. I use External Pages to integrate this site into the CMS so unless someone knows of a plugin (or is willing to create one) that will integrate SAMS Broadcaster's website into the Geeklog 1.5 CMS, getting External Pages to work with Geeklog 1.5 is very important to me.

Any help would be greatly appreciated.

Thanks,
John Orion

John -

I just realized - I think you are attempting to utilize the older 'external pages' plugin that Tom Willett wrote. It is a possibility that this plugin is not compatible with 1.5.0 - it was written for 1.3.6, and the plugin API has evolved considerably since then.

Did you have this running successfully under an older version of Geeklog, and then update it later? Or is this an entirely new endeavor?

Note that by using the in-built staticpages plugin that ships with 1.5.0, it is possible to reference other static content on your site, however usually there are some gymnastics associated with trying to integrate two different packages each of which utilize their own userid/session/security context. It's not impossible, just a bit difficult.

-m
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
I'm using the External pages plugin on one of my testsites with GL1.50, and it works fine (with php4). However, the external page is just some kind of search form, so there's no php involved.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Orion

Anonymous
ok as for chameleon .. i was using a svn version that was supposed to be working with 1.5 but this problem happens with both professional and chameleon... and in glFusion

and yes im using external pages plugin to integrate my radio into geeklog and no its more than a stats thing .. there is code you add to your site.php files that puts the header, sidebars and footer on the page making it look like its part of the geeklog cms.


and as for the version stuff .. yes I understand that this is the problem. It does work fine in 1.4.1 but does not work in 1.5 .. what i was hoping .. was because it was so useful that someone would be able to look at it and figure out how to update it so it would work with 1.5

there are several plugins that i use that do not work with 1.5 so I have gone back to 1.4.1. I did like 1.5 but it just didn't work right with the things I need.

Until stuff like external pages updated (or an equivalent is produced) then I'm just going to be stuck with 1.4.1.

I will keep looking for updated plugins and hopefully someday I will be able to update.
 Quote

Orion

Anonymous
I discovered this is an issue with PHP5 ... anyone know how to modify the code to eliminate that php5 warning error?

Again this isn't an issue with geeklog, layouts or mysql databases or any versions of them. This is a php 5 issue.
 Quote

All times are EST. The time is now 10:38 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content