TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 500
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 102
  • Total: 102

SSI functions from different forum

Started by Mavn, September 17, 2006, 06:12:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mavn

I have two forums 1st http://site/ (smf+tp) 2nd http://site/community (smf only)
How I can use SSI in 1st from 2nd forum??

I am trying change
Tportal.php

// include the necessary files.
require_once($boarddir.'/SSI.php');

to

// include the necessary files.
require_once($boarddir.'/community/SSI.php');


but it's doesn't work  :(. I can't found where calling this file for TP.
I am trying change this too
Admin.php

// Find the version in SSI.php's file header.
$fp = fopen($boarddir . '/SSI.php', 'rb');

to

// Find the version in SSI.php's file header.
$fp = fopen($boarddir . '/community/SSI.php', 'rb');


but it's doesn't work again  :(  ???
How I can calling SSI functions from second forum?

G6Cad

I have read some threads on SMF forums on how to get this to work.
I think you are more lucky in getting it right if you searches the SMF forums or ask the question there.
I think it was in the database forum i read about it.

akulion

hey not to go off topic - but while we are discussing SSI

does anyone know how I can include SSI.php from SMF in another PHP page (not part of SMF) on the same server so that it shows how many people are online?

Something like Users Online Block

thanks

Mavn

I am search in database too, no results. it's realy funy how it's working :)
In smf I find information about it. I am reading all docs about SSI(basic, expert, etc...) but I don't know how I can use it in this situation  ... :(. I am enteresting do it 1-2 calling SSI.php not any more, but where ? I am find another place where calling this file

File Subs-Package.php

function package_create_backup($id = 'backup')
{
global $db_prefix, $sourcedir, $boarddir;

$files = array();

$base_files = array('index.php', 'SSI.php', 'agreement.txt', 'ssi_examples.php', 'ssi_examples.shtml');
foreach ($base_files as $file)
{
if (file_exists($boarddir . '/' . $file))
$files[realpath($boarddir . '/' . $file)] = array(
empty($_REQUEST['use_full_paths']) ? $file : $boarddir . '/' . $file,
stat($boarddir . '/' . $file)
);
}

$dirs = array(
$sourcedir => empty($_REQUEST['use_full_paths']) ? 'Sources/' : strtr($sourcedir . '/', '\\', '/')
);


but I don't know php realy good for do it this changes :(  

akulion
Something like this

<?php
require(dirname(__FILE__) . '/SSI.php');
ssi_whosOnline(); flush();
?>


but maybe I am wrong

eldacar

You can't use SSI.php from one forum in another, the naming conflicts would be massive! You could possibly use smf_api..

Quote from: akulion on September 17, 2006, 10:47:10 PMhey not to go off topic - but while we are discussing SSI

does anyone know how I can include SSI.php from SMF in another PHP page (not part of SMF) on the same server so that it shows how many people are online?

Something like Users Online Block
ssi_whosOnline(); or ssi_logOnline();

akulion

#5
thanks eldÊÅ'ka - did that and working great except for one issue

the ssi_logOnline(); dosent seem to work as advertized (well atleast in my case)

no matter how many friends i send over to the custom pages the user stats for ssi_logOnline(); and ssi_whosOnline(); stay EXACTLY the same

which is really weird since the logOnline function is supposed to count ALL visitors/users anywhere

while the whosOnline is ONLY supposed to show visitors/users browsing the forums

any ideas?


Mavn

eldÊÅ'kaː
Thanks, I am trying use smf_api

Mavn

#7
If I am renaming SSI.php to SSI2.php and do it changes for working in second forum can I use this method?

ADD It's working wihtout problem :)

eldacar

I don't know how it could possibly be working, because what would $user_info refer to? What does $scripturl refer to? Plus there would be a hundred function name conflicts.

Xarcell

renaming that file will make many other things break.

This website is proudly hosted on Crocweb Cloud Website Hosting.