1
dukeofgami
Re: Problem when I "move" my PHP script
  • 2006/2/23 5:05

  • dukeofgami

  • Just popping in

  • Posts: 9

  • Since: 2005/12/19


HAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHAHAHAH OMG!!!! I solved it... WITH AN IFRAME!!!! xD... I wasted an entire day to rediscover the iframe, lololol... well, I hope this thread turns useful to someone else xD.



2
dukeofgami
Re: Problem when I "move" my PHP script
  • 2006/2/23 1:09

  • dukeofgami

  • Just popping in

  • Posts: 9

  • Since: 2005/12/19


Ok, I made it work commenting that line # 95... however notifications disappear... so its not a real solution.

How can I get the HTML output of a PHP file?... so I can like just put that HTML in a block. Can it be done?, could anyone help me please?



3
dukeofgami
Re: Problem when I "move" my PHP script
  • 2006/2/22 21:59

  • dukeofgami

  • Just popping in

  • Posts: 9

  • Since: 2005/12/19


Ok, now I tried several things, I tried moving the script to the modules/news/ folder, it works perfectly as a file, it also works perfectly when included in a block from the default index, but then, when I choose the news module as the start page, i get the same error again.

So I think its got nothing to do with the very location of the script... but a resouce it cant get or something like that from that location, for the script.

Heres line 95 of notification_functions.php

$not_config =& $module->getInfo('notification');


From this function.

function &notificationCategoryInfo ($category_name=''$module_id=null)
{
    if (!isset(
$module_id)) {
        global 
$xoopsModule;
        
$module_id = !empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0;
        
$module =& $xoopsModule;
    } else {
        
$module_handler =& xoops_gethandler('module');
        
$module =& $module_handler->get($module_id);
    }
    
$not_config =& $module->getInfo('notification');
    if (empty(
$category_name)) {
        return 
$not_config['category'];
    }
    foreach (
$not_config['category'] as $category) {
        if (
$category['name'] == $category_name) {
            return 
$category;
        }
    }
    
$ret false;
    return 
$ret;
}


Hope i dont need to core hack...

Could anyone at least say something?? xD



4
dukeofgami
Re: Problem when I "move" my PHP script
  • 2006/2/22 16:03

  • dukeofgami

  • Just popping in

  • Posts: 9

  • Since: 2005/12/19


Ok... I tried an include_once in the block, same thing... anyone please?



5
dukeofgami
Re: Xoops - low speed
  • 2006/2/21 20:10

  • dukeofgami

  • Just popping in

  • Posts: 9

  • Since: 2005/12/19


You can optimize fields in your phpMyAdmin (lil icon with a ray), same thing happened with my forums, till I optimized some auth fields and now it runs really fast.

Beware, indexing will make your db bigger, so dont optimize everything...



6
dukeofgami
Re: Problem when I "move" my PHP script
  • 2006/2/20 14:41

  • dukeofgami

  • Just popping in

  • Posts: 9

  • Since: 2005/12/19


...anyone?



7
dukeofgami
Problem when I "move" my PHP script
  • 2006/2/20 1:27

  • dukeofgami

  • Just popping in

  • Posts: 9

  • Since: 2005/12/19


Hi, I modified this script in order to see my phpBB2 latest active topics, it works, but when I tell XOOPs to make the start page the news module, i get a fatal error:


Fatal error: Call to a member function getInfo() on a non-object in D:\sokkit\site\include\notification_functions.php on line 95

This is the code:

<?php
///////////////////////////////////////////////////////////////////////////////
//                            ACTIVE_TOPICS.PHP
///////////////////////////////////////////////////////////////////////////////
// Copyright:   (C) 2002 Matthijs van de Water <matthijs@beryllium.net>
// Version:     1.1
// Date:        03/02/2002
///////////////////////////////////////////////////////////////////////////////
// Show phpBB 2.0 Active Topics List
// Output format can be any HTML or XML
// This script must be able to access vital phpBB 2.0 configuration scripts
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// CUSTOM SETTINGS
///////////////////////////////////////////////////////////////////////////////

// Amount of active topics to show
define("TOPIC_COUNT"20);

// Path to the phpBB 2.0 root directory
define("PHPBB_PATH""foro/");

// URL to the phpBB 2.0 installation
define("PHPBB_LOCATION""http://localhost/foro/");

// Time format to output the date/time (for format see PHP manual)
define("TIME_FORMAT""H:i");

///////////////////////////////////////////////////////////////////////////////

// Includes of phpBB scripts
$phpbb_root_path PHPBB_PATH;
if ( !
defined('IN_PHPBB') ) 
{
  
define('IN_PHPBB'true);
  include(
PHPBB_PATH 'extension.inc');
  include(
PHPBB_PATH 'config.'.$phpEx);
  include(
PHPBB_PATH 'includes/constants.'.$phpEx);
  include(
PHPBB_PATH 'includes/db.'.$phpEx);
}

///////////////////////////////////////////////////////////////////////////////
// HTML header start
///////////////////////////////////////////////////////////////////////////////
?>
<table border="0" cellpadding="3" cellspacing="1">
  <tr>
      <td>Tema</td>
      <td>Vistas</td>
      <td>Respuestas</td>
      <td>Ultima respuesta</td>
    </tr>
<?php
///////////////////////////////////////////////////////////////////////////////
// HTML header end
///////////////////////////////////////////////////////////////////////////////

// sql statement to fetch active topics of public forums
$sql "SELECT DISTINCT t.topic_title, t.topic_id,t.topic_views,t.topic_replies, t.topic_last_post_id, p.post_time,p.poster_id, f.forum_name, u.user_id, u.username
  FROM " 
TOPICS_TABLE " AS t, " POSTS_TABLE " AS p, " FORUMS_TABLE " AS f, " USERS_TABLE " AS u
  WHERE 
    t.forum_id = f.forum_id 
      AND f.auth_view = " 
AUTH_ALL 
      AND p.topic_id = t.topic_id 
       AND p.poster_id = u.user_id 
      AND p.post_id = t.topic_last_post_id
  ORDER BY p.post_time DESC LIMIT " 
TOPIC_COUNT;
$nt_result $db->sql_query($sql);

if(!
$nt_result)
{
    die(
"Failed obtaining list of active topics".mysql_error());
}
else
{
    
$nt_data $db->sql_fetchrowset();
}
    
if ( 
count($nt_data) == )
{
    die(
"No topics found");
}
else
{
$cq 1;
$cc 333333;
  
// $nt_data contains all interesting data
  
for ($i 0$i count($nt_data); $i++)
  {
    
$title $nt_data[$i]['topic_title'];
    
$Turl PHPBB_LOCATION 'viewtopic.' $phpEx "?t=" $nt_data[$i]['topic_id'];    
    
$LPurl PHPBB_LOCATION 'viewtopic.' $phpEx "?" POST_POST_URL "=" $nt_data[$i]['topic_last_post_id'] . "#" $nt_data[$i]['topic_last_post_id'];
    
$on_forum 'En el foro ' $nt_data[$i]['forum_name'];
    
$post_time date(TIME_FORMAT$nt_data[$i]['post_time']);
    
//Profile profile.php?mode=viewprofile&u=23
    
$profile PHPBB_LOCATION 'profile.' $phpEx "?mode=viewprofile&u=" $nt_data[$i]['poster_id'] ;
    
$usrname $nt_data[$i]['username'];
    
    
// As of now you can actually do anything with the data
    // I chose to output in XML

///////////////////////////////////////////////////////////////////////////////
// Item HTML start
///////////////////////////////////////////////////////////////////////////////
if($cq%== 0){$cc "FFFFFF";$cq++;} else{$cc "CCCCCC";$cq++;}?>
  <tr>
    <td bgcolor="#<?php echo $cc;?>" align="left"><a href="<?php echo $Turl?>" title="<?php echo $on_forum?>"><?php echo $title?></a></td>
    <td bgcolor="#<?php echo $cc;?>" align="left"><div align="center"><?php echo $nt_data[$i]['topic_views'?></div></td>
    <td bgcolor="#<?php echo $cc;?>" align="left"><div align="center"><?php echo $nt_data[$i]['topic_replies'?></div></td>
    <td bgcolor="#<?php echo $cc;?>" align="left">Por <a href="<?php echo $profile?>"><?php echo $usrname?></a><a href="<?php echo $LPurl?>"><img src="<?php echo PHPBB_LOCATION;?>/templates/subSilver/images/icon_latest_reply.gif" border="0" /></a>
    </td>
  </tr>
<?php
///////////////////////////////////////////////////////////////////////////////
// Item HTML end
///////////////////////////////////////////////////////////////////////////////

  
}
}

///////////////////////////////////////////////////////////////////////////////
// Footer HTML start
///////////////////////////////////////////////////////////////////////////////
?>
</table>
<?php
///////////////////////////////////////////////////////////////////////////////
// Footer HTML end
///////////////////////////////////////////////////////////////////////////////

// EOF
?>


So I am wondering, how could the code be called as a file? or something like that so it wont conflict with anything?, even if I use the correct path it wont work...

I tried the <script src="path/myscript.php"></script> thing but wont work...

What can I do?

Thanx in advance



8
dukeofgami
Question about news module
  • 2006/2/15 2:23

  • dukeofgami

  • Just popping in

  • Posts: 9

  • Since: 2005/12/19


Hi, I have been searching all kinds of options in the news module and cant seem to find how to make the news apear like this in my index page:

http://www.hardwarecult.com/XOOPS/XOOPS22/modules/news/

Instead of this:

http://www.hardwarecult.com/XOOPS/XOOPS22/

So my portal's news look like this:

http://www.selosdije.com/

Is this some kind of trick in which you put the news module's index as the main index?...

Nevermind, it is xD... oh well



9
dukeofgami
Few questions about XOOPS-phpBB2...
  • 2006/1/31 4:45

  • dukeofgami

  • Just popping in

  • Posts: 9

  • Since: 2005/12/19


Hi, I've already seen the stuff from bbpixel... I've tried the module, it didnt work cus of the versions...

So I think the best thing I can do is be the less invasive with XOOPSs and phpBBs core files... I want to be able to upgrade... I already have the forum live, and im not interested in such a module...

My questions are:

-How can I make XOOPS use the users from my phpBB 2 db? I saw that phpBB and XOOPS have almost the same table structure, BBPixel kinda explains how his module works... but I didnt realy understand how...

Do I have to make some kind of php bridge file that tells XOOPS to get data from phpbbs db? (I dont know php lol (I understand most of it though...), but I have friends who do...)

-If I manage to do this, will the normal login block do?, or should I replace it for another one? (will BBPixels login block do?)... and if I do this, will I be able to login to administration?... I'd also like to have my users registered with phpBBs form...

Hope you guys can help me... I have an impatient comunity waiting xD. You can check it at www.hardwarecult.com ^^

Thanx in advance,

David.




TopTop



Login

Who's Online

167 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 167


more...

Donat-O-Meter

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

Latest GitHub Commits