News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Showing Attached Topic images in ssi_boardnews

Started by ModelitMatt, February 04, 2011, 03:18:57 AM

Previous topic - Next topic

Arantor

No, now it's going to still output rubbish since the one that was outputting garbage like null attachments is the one WITHOUT parameters being passed to it.

<?php require("/ **Link to SSI Hidden* /SSI.php"); 

$parameters = array(
  
'limit' => 15,
  
'board' => array(1.0),
  
'board_disp' => true,
  
'category_disp' => true,
  
'avatar' => 'left',
  
'icon' => 'thumbup',
  
'attachments' => 'inline' 
    
);
ssi_multiBoardNews($parameters); ?>


You have to set the parameters then pass them to ssi_multiBoardNews. Now the values are more sensible, odds are something will result that's useful.

ModelitMatt

I tried adjusting it to that but it's not linking up with the attached image, it's still showing blank.

Is it configured properly for this example post:
http://modelitup.com/articles/index.php?topic=5.0

It's within board 1.0

Arantor

So, what's the link to it? Any of the above links?

ModelitMatt

Links:

Example Post
http://modelitup.com/articles/index.php?topic=5.0

Test Page
http://www.modelitup.com/final_modelitup/new_test.php

Current Code


<?php require("/ *removed* /SSI.php"); 

  
$parameters = array(
  
'limit' => 15,
  
'board' => array(1.0),
  
'board_disp' => true,
  
'category_disp' => true,
  
'avatar' => 'left',
  
'icon' => 'thumbup',
  
'attachments' => 'inline' 
    
);
ssi_multiBoardNews($parameters); ?>




SSI code is as was in past posts no adjustments to it.

Arantor

That just gives me an HTTP 500 error which suggests something else is wrong.

Note that you shouldn't use 1.0 as the board number since it's not 1.0, just 1

ModelitMatt

Yea it gave me the same thing, I tried 1 as well which is what I've switched it to now but still same result.

Arantor



Arantor

I know why you get nothing.

None of the topics have a first post whose icon is the thumbs up icon. So none of them match that criteria - and nothing is displayed as a result.

ModelitMatt

omg! that was it! :D

Thanks tons !

I guess I just modify the body in the ssi now to make it custom?

Wow, even shows the avatar, so much better :D!!!

Arantor

You can, or you can use the output method parameter to just get an array of information back and then output it with whatever code you like.

ModelitMatt

Are you able to provide an example of an output method.

I would need to output the

  • Icon
  • Title
  • Attachment
  • Post Date
  • Posted By
  • Comment
  • Write Comment

Arantor

Given that it's 2am, I probably should be in bed. But really, you could just try it... or read the mod's actual support thread where I'm sure at least one person already did that.

Or if you feel so inclined just modify the mod's code. It will naturally break uninstalling it though...

ModelitMatt

No worries, I'm thankful you assisted me to this point you were tons of help :)
Have a great sleep and I will keep looking into how to work with the mod rather than modify the code.

Thanks for the advice and I look forward to using this :D
Thanks for contributing to SMF and congratulations on 40,000+ posts, I'm sure you've helped tons!

Thanks again :)

Advertisement: