• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Film Strips for Movie Sites

yilmaz

Active member
What does this addon do?

This add-on pulls the first image of a post which is using the [ IMG ] tag and shows it in a movie strip.

How To Install:
  • Unzip the archive and upload the folders js and library, which are located inside the MoviesPosters folder, to your forum's root.
  • Rotate to Admin > Plugin Install
  • Import the product addon_yilmaz_movies_posters.xml
Template Modification:

Search for the template forum_list and find this code :

HTML:
<xen:if is="{$renderedNodes}"><xen:include template="node_list" /></xen:if>

and add after, this:

HTML:
<xen:if is="{$Yilmaz_MoviesPosters}"><xen:include template="yilmaz_movies_posters" /></xen:if>

Add-On Configuration
  • Go to the option page which you can find via Admin > Options > Home > [Yilmaz] Movies Ribbon
  • Write down the forum ID's. Threads located in these forums will have their first image shown in the film strip block. Seperate each forum ID using a comma (,). Example: 3, 6, 34
  • Define the total amount of imges to be shown or in another word 'rotated'.
  • Define how many images will be shown in a single row before rotating. Standard value is 6 but some themes need a less value. You can of course increase this value at your liking.
Changelog

08.03.2011

  • Addon written from the scrach. Many bug fixes, speed improvements
  • No longer BBCODE problems with the addon.
  • JQuery conflicts resolved.
  • New option. Be able to define how many images to be shown in one row.
 

Attachments

  • MoviesPosters1.webp
    MoviesPosters1.webp
    44.1 KB · Views: 376
  • MoviesPosters2.webp
    MoviesPosters2.webp
    26.4 KB · Views: 295
  • MoviesPosters.zip
    MoviesPosters.zip
    19.4 KB · Views: 124
Very nice. I'm sure this would be very beneficial for people wanting to show off previews of they're resources. Nice job yilmaz keep up the good work. I'll install this later and check it out.
 
Very nice plugin!
Also I'm looking for a movie forums plugin which will add a new type of node - movie discussion and review with custom fields and review system! :)
 
Yılmaz said it gets problematic when the first image of the post has a previous tag used for instance CENTER or bold etc. I tried on my board and yes it does. Can anyone fix that, have an Idea how to fix that ? :)
 
Thank you for the excellent work
attachment.php
 
Yılmaz said it gets problematic when the first image of the post has a previous tag used for instance CENTER or bold etc. I tried on my board and yes it does. Can anyone fix that, have an Idea how to fix that ? :)

I messed around and wrote a basic bbcode formatter that pulls the first image out of the text:
PHP:
class Testing_GetFirstImageFormatter extends XenForo_BbCode_Formatter_Base
{
    protected $_firstImage;

    public function renderTagImage(array $tag, array $rendererStates)
    {
        $imgCode = parent::renderTagImage($tag, $rendererStates);
        if ( $this->_firstImage === null ) {
            $this->_firstImage = $imgCode;
        }
        return $imgCode;
    }

    public function getFirstImage()
    {
        return $this->_firstImage;
    }
}

If all you need is the image, you should be able to replace the bbcode/message processing with this:
PHP:
$formatter = XenForo_BbCode_Formatter_Base::create('Testing_GetFirstImageFormatter');
$bbCodeParser = new XenForo_BbCode_Parser($formatter);
$FILM['message'] = substr($FILM['message'], 0, $options->yilmaz_mp_of_character) . "...";
$bbCodeParser->render($FILM['message']);

// will contain the <img ... /> code for the first image of the post, or null if no image exists.
$FILM['message'] = $formatter->getFirstImage();
 
Indigo, thanks for the feedback. I'll try it on my board and get back here. One of the problems with the plugin is that does interfere with TagiaChat when enabled, in Internet Explorer. Any insight how to fix that ?
 
Unfortunately, that sounds like a style issue, and I'm not quite as well-versed in that area. At least, not well-versed enough to answer it off the top of my head.

One thing I forgot to mention, though, if you swap out the code, remove the </iframe></noscript> from the yilmaz_movies_posters template, since my code won't generate those.
 
And an Aussie indie movie in the image strip :) Thanks for the mod yilmaz, will include in our next update to scaryminds.com
 
I get this error on my FORUM tab.

Server Error

Undefined offset: 2
  1. XenForo_Application::handlePhpError() in Yilmaz/MoviesPosters/Model/MoviePoster.php at line 39
  2. Yilmaz_MoviesPosters_Model_MoviePoster::Yilmaz_MoviesPostersArray() in Yilmaz/MoviesPosters/Controller/Public.php at line 10
  3. Yilmaz_MoviesPosters_Controller_Public->actionIndex() in XenForo/FrontController.php at line 310
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  5. XenForo_FrontController->run() in /home/xxxxx/thetfp.com/index.php at line 13
 
Hi Yılmaz, is there a way to show up this addon in xenporta?

I'm having some problems with the add-on:

- When a thread gets soft deleted I'm getting this error when I return to the forum :

Code:
Undefined index: library/Yilmaz/MoviesPosters/Model/MoviePoster.php:49

#0 /home/...../public_html/library/Yilmaz/MoviesPosters/Model/MoviePoster.php(49): XenForo_Application::handlePhpError()
#1 /home/...../public_html/library/Yilmaz/MoviesPosters/Controller/Public.php(10): Yilmaz_MoviesPosters_Model_MoviePoster::Yilmaz_MoviesPostersArray()
#2 /home/...../public_html/library/XenForo/FrontController.php(303): Yilmaz_MoviesPosters_Controller_Public->actionIndex(Object(XenForo_RouteMatch))
#3 /home/...../public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch()
#4 /home/...../public_html/index.php(15): XenForo_FrontController->run()
#5 {main}

array(3) {
["url"] => string(26) "http://www......com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Let me remind you that I've been using XenPorta with the index controller feature.
 
Top Bottom