MyBB Hacks

Full Version: Download System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
(08-16-2011 12:43 AM)Lich_king2 Wrote: [ -> ]Is it possible to more screenshots in preview?
We can add more custom thread fields (unlimited)  like the screenshot custom thread fields:
(04-30-2010 04:26 AM)RateU Wrote: [ -> ]Create a Custom Thread Fields with this settings:
  • Title: Screenshot
  • Key: fscr
  • Description: Upload a screenshot
  • Applicable Forums: 'select the forum in point 1 or 2'
  • Input Field Type: File
  • Valid File Extensions: gif|png|jpg|jpeg
    Modify it as our needs.
  • Maximum File Size: 1048576
    Modify it as our needs. Like the title says, it is a maximum image file size (in bytes) that can be uploaded.
  • Editable by / Required Field?: Everyone (Required)
  • Display Order: 3
  • Only accept uploaded images: Yes
  • Image Thumbnail Generation: 320x240|640x480

There are some changes we need to do for the additional custom thread fields:
  • Key:
    Just remember that we need to use unique Key. So, we need to use other Key for the additional custom thread fields, for example: fscr2, fscr3 and etc.
  • Editable by / Required Field?: (optional change)
    If the additional screenshots are not required, we need to choose the Everyone option. Or we can set which usergroup(s) have a permission to upload more screenshots using that custom thread fields.
  • Display Order:
    Maybe we need to re-order the custom thread fields related to this forum.
  • Image Thumbnail Generation: (optional change)
    We can change the thumbnail size if we want it to be different from the first one.
  • Display Format:
    If the additional custom thread fields are not required, maybe it's better to put the layout inside the Display Format, for example:

    HTML Code
    <a href="{URL}" target="_blank"><img src="{URL}/thumb320x240" alt="" title="" /></a>

    Change the 320x240, depends on the Image Thumbnail Generation setting for that custom thread field.
    Then, put this kind of variable in our templates:

    Code:
    {$GLOBALS['threadfields']['fscr2']['value']}

    Change the fscr2, depends on the Key setting for that custom thread field.
    With this way, if there is no additional screenshots uploaded (if this custom thread field is not a required field), there is no "broken" image will be displayed (for some browsers).
    Or, we can set the Blank Replacement Value setting to define a default image to be displayed if there is no additional picture uploaded from this field. Example:

    HTML Code
    <img src="path_to_default_image" alt="" title="" />


(08-16-2011 12:43 AM)Lich_king2 Wrote: [ -> ]Plus how would I link to other url's to start downloads from there?
If you meant that the file stored in other location (not via custom thread field), use Textbox for the File Upload. When creating a new thread, type the URL in it. Example:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=293&pid=38
Update (need at least XThreads 1.47):

1. dld_forumdisplay_thread template.
Find (around line #49):

HTML Code
<img src="{$GLOBALS['threadfields']['fscr']['url']}/thumb320x240" alt="{$thread['subject']} Screenshot" title="{$thread['subject']} Screenshot" width="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['w']}" height="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['h']}" />


Replace with:

HTML Code
<img src="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['url']}" alt="{$thread['subject']} Screenshot" title="{$thread['subject']} Screenshot" width="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['w']}" height="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['h']}" />


2. dld_showthread template.
Find (around line #65):

HTML Code
<img src="{$GLOBALS['threadfields']['fscr']['url']}/thumb320x240" alt="{$thread['subject']} Screenshot" title="{$thread['subject']} Screenshot" width="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['w']}" height="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['h']}" />


Replace with:

HTML Code
<img src="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['url']}" alt="{$thread['subject']} Screenshot" title="{$thread['subject']} Screenshot" width="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['w']}" height="{$GLOBALS['threadfields']['fscr']['thumbs']['320x240']['h']}" />

i'm new to all this and i'm not sure how to set this up, it seems not everything is showing like in the original preview of the plugin
[Image: 2m2vqpv.png]
It seems that all custom thread fields you created are textbox type?
yea
Well, could you please read again the first post.
Not all custom thread fields use a textbox.
Read the File Upload, Screenshot and the Category custom thread fields.
They are not a textbox.
"Input Field Type: File" i don't see file anywhere oO
It's in the Input Field Type dropdown list

[attachment=613]
i don't have it -.- Frown
That must suck.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Reference URL's