Advertisement:

Author Topic: SSI integration changed  (Read 18699 times)

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
SSI integration changed
« on: March 18, 2008, 07:04:34 PM »
I use custom pages. How this is changed?

Code: [Select]
<?php
$ssi_gzip 
true;
$ssi_ban true;
$ssi_layers = array('main');
$context['page_title'] = 'ytutu.Net -  haun tulokset';
ob_start();
$ssi = include('/var/www/fs5671/0/567567/public_html/foorumi/SSI.php');

if (!
$ssi)
   {
   echo 
'Serverillä näyttää olevan ongelmia. Ole hyvä ja yritä myöhemmin uudelleen.';
   die;
}

?>
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline codenaught

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,653
  • Gender: Male
  • Formerly Known As akabugeyes
Re: SSI integration changed
« Reply #1 on: March 18, 2008, 07:11:33 PM »
Well for starters, there is no longer a layer called 'main'. It has been split into 'body' and 'html' layers.

So you would probably want to change the $ssi_layers part of code to:

Code: [Select]
$ssi_layers = array('html', 'body');
Dev Consultant
Former SMF Doc Coordinator

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: SSI integration changed
« Reply #2 on: March 18, 2008, 07:23:27 PM »
Okay, now i get

Code: [Select]
Fatal error: Cannot redeclare ssi_shutdown() (previously declared in /var/www/fs1/0/public_html/foorumi/SSI.php:182) in /var/www/fs1/0/public_html/tetst/SSI.php on line 184

edit: wait a minute. That second path is wrong. Hmmm, wonder why.
« Last Edit: March 18, 2008, 07:25:42 PM by Owdy »
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline codenaught

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,653
  • Gender: Male
  • Formerly Known As akabugeyes
Re: SSI integration changed
« Reply #3 on: March 18, 2008, 07:26:09 PM »
You don't happen to have ssi_shutdown() declared a second time anywhere do you?

It seems from the error message you may be loading SSI from both /foorumi/SSI.php and tetst/SSI.php at the same time?
Dev Consultant
Former SMF Doc Coordinator

Offline metallica48423

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Professional Multislacker!
    • Zentendo
Re: SSI integration changed
« Reply #4 on: March 18, 2008, 07:28:24 PM »
try using require_once() or include_once on SSI.php instead of include or require.

For some strange reason i found that i had this happen for some reason in my script.
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

Quote
Microsoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"

Useful Links:
Online Manual!
How to Help us Help you   
Search
Settings Repair Tool
     

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: SSI integration changed
« Reply #5 on: March 18, 2008, 07:29:21 PM »
You don't happen to have ssi_shutdown() declared a second time anywhere do you?
No

Quote
It seems from the error message you may be loading SSI from both /foorumi/SSI.php and tetst/SSI.php at the same time?
Yeah, that other path is to my test forum. I dont understand how that path is there.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline codenaught

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,653
  • Gender: Male
  • Formerly Known As akabugeyes
Re: SSI integration changed
« Reply #6 on: March 18, 2008, 07:31:24 PM »
Owdy, you don't by any chance have code in your index.template.php to load SSI.php from your test forum perhaps?
Dev Consultant
Former SMF Doc Coordinator

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: SSI integration changed
« Reply #7 on: March 18, 2008, 07:33:46 PM »
Bingo! Aaaaahhh, i got wrong path in my index.template. :)

Thanks!
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline metallica48423

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Professional Multislacker!
    • Zentendo
Re: SSI integration changed
« Reply #8 on: March 18, 2008, 07:41:42 PM »
woo :)

All taken care of, Owdy?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

Quote
Microsoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"

Useful Links:
Online Manual!
How to Help us Help you   
Search
Settings Repair Tool
     

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: SSI integration changed
« Reply #9 on: March 18, 2008, 07:59:18 PM »
All taken care of, Owdy?
Heh, i hope so. I only got that issue with my Team Preview page: http://www.simplemachines.org/community/index.php?topic=216143.msg1472620#msg1472620

Maybe i should start own topic about that.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: SSI integration changed
« Reply #10 on: March 18, 2008, 08:06:26 PM »
LOL, every custom hack has to change. Sorry guys, but how do i fix this?

Code: [Select]
<?php
$viestit 
ssi_recentPosts(50, array(), 'return');
foreach (
$viestit as $post)
     echo 
''$post['time'], '&nbsp;<a href="'$post['href'], '">'$post['subject'], '</a> - '$post['poster']['link'], '<br />';
echo
'
</div>'
;
ssi_shutdown();
?>

Im sorry to keep you this busy with my guestions :D
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline metallica48423

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Professional Multislacker!
    • Zentendo
Re: SSI integration changed
« Reply #11 on: March 18, 2008, 08:24:18 PM »
what is it or is it not doing?  Have you checked to see if the parameters that the function is expecting has changed between 1.1.4 and 2.0's SSI? (just to knock that out).  I'd also check that the keys are the same.

I've never used return, shouldn't it be array?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

Quote
Microsoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"

Useful Links:
Online Manual!
How to Help us Help you   
Search
Settings Repair Tool
     

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: SSI integration changed
« Reply #12 on: March 18, 2008, 08:25:47 PM »
It should show 50 last topics. Now it gives 'Database error, given array of integer values is empty.'
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Offline metallica48423

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Professional Multislacker!
    • Zentendo
Re: SSI integration changed
« Reply #13 on: March 18, 2008, 10:01:52 PM »
well... The array IS empty :P

You're missing an argument as well.  Its changed (i guess)

from SSI.php
function ssi_recentPosts($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo')

So your first array needs to carry the boards you want to EXCLUDE, the second is the ones you want to INCLUDE

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

Quote
Microsoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"

Useful Links:
Online Manual!
How to Help us Help you   
Search
Settings Repair Tool
     

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,341
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: SSI integration changed
« Reply #14 on: March 19, 2008, 12:31:51 AM »
use NULL instead of array().
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: SSI integration changed
« Reply #15 on: March 19, 2008, 02:05:58 AM »
Okay, this works :)

Code: [Select]
<?php
$viestit 
ssi_recentPosts(50NULLNULLNULL);
foreach (
$viestit as $post)
     echo 
''$post['time'], '&nbsp;<a href="'$post['href'], '">'$post['subject'], '</a> - '$post['poster']['link'], '<br />';
echo
'
</div>'
;
ssi_shutdown();
?>
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0