Jump to content

DC - Images On Forum Home


Soniceffect
 Share

Recommended Posts

index.php?app=downloads&module=display&s



File Name: DC - Images On Forum Home

File Submitter: Marc_S

File Submitted: 19 Feb 2014

File Category: User and Social Engagement

Supported Versions: IP.Board 3.4.x



This hook allows a simple way to show all the images that have been attached within forum(s).

Settings include the following at present, however will likely be adding more. Can be found under System>Settings>DC - IOFH

  • Number of images to show
  • Groups who can see the images
  • Forums to show images from

Images when clicked will take you to where they were posted. Any images which run over the bar will not be shown so as to always fit within the section provided for them.

This is my first modification for IPB so far so be gentle :tongue:




here to download this file

Link to comment
Share on other sites

For me (ipb v 3.4.6) it is working...

Any chance to make this as a IP.Content block? maybe with the name of the File and the total number of Downloads ? vertical aligned?

Any ideas how to show this?

This should work for the ip content question.

If we know what Marc_S has called the hook class name, we just need to create a new raw php block and put the following in the template - ensuring you add the hook class name where it says "add hook class name here

### Load hook file #####################################

$hook_class_name = 'add hook class name here';

########################################################

$hook_file = '';
$hooksCache = ipsRegistry::cache()->getCache( 'hooks' );

foreach( $hooksCache['templateHooks']['skin_boards'] as $hook )
{
if( strtolower( $hook['className'] ) == strtolower( $hook_class_name ) ) $hook_file = $hook['filename'];
}

if ( empty($hook_file) || !file_exists( IPS_HOOKS_PATH . $hook_file ) )
{
if( $this->memberData['g_access_cp'] )
echo '<div class="message error"><b>Error!</b> Hook with classname "' . $hook_class_name . '" does not exist!</div>';
else
echo '';
}
else
{
require_once( IPS_HOOKS_PATH . $hook_file );
$loadHookClass = new $hook_class_name;

echo $loadHookClass->getOutput();
}

Link to comment
Share on other sites

Thank you so much, for your work, Sir!

Indeed it is working...!

The only problem with this is, that i want to hide it on the Forumhome - and i found now way until now to do this...

And i need to change the skin, for a vertical alignment. I will see how i can do this, with my little knowledge of CSS/HTML...

BUT YOUR POST IS A GREAT HELP!!!

thank you.

Link to comment
Share on other sites

  • 5 weeks later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...