10-01-2010, 04:44 PM
10-11-2010, 08:07 AM
Hey
Is there posibility to add external links do download?? or only attached files?
Is there posibility to add external links do download?? or only attached files?
10-11-2010, 09:15 AM
We can use a textbox field type for the file URL, something like this:
Textbox field for File URL:
Then, put this variable in our template:
Textbox field for File URL:
- Title: File URL
- Key: dld_file
- Applicable Forums: select our download forum
- Input Field Type : Textbox
- Editable by / Required Field? : Everyone (required)
Modify it as our needs. Select which usergroups can use this fields. - Display Format :
HTML Code<a href="{VALUE}">Download File</a>
- Text Mask Filter :
Code:^https?\://
- Viewable by Usergroups :
Select which usergroup can download / view the download link. Leave it as default if we want the file available for all usergroup. - Unviewable Value :
HTML Code<span class="smalltext"><em>You don't have permission to view this file URL</em></span>
The Unviewable Value setting only available if we select at least one usergroup in Viewable by Usergroups settings. Modify it as our needs. This is a layout for usergroup that doesn't have permission to view the download link.
Then, put this variable in our template:
Code:
|
10-18-2010, 11:22 PM
RateU, to use the textbox instead of the file upload, which templates on the first post should we edit with
Code:
|
10-19-2010, 02:05 AM
If you refer to this style:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=498&pid=37
We need to edit:
We don't need other template, because we can't count how many download for each file.
If we want to add other info for the file, for example: file size and version, we can add another textbox for it. But all of them should be filled manually when creating/editing a thread.
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=498&pid=37
We need to edit:
- mhdld_postbit_first and mhdld_postbit_first_classic template:
Find (around line #29 - #34):
HTML Code<strong>Download: <a href="{$GLOBALS['threadfields']['mhdld_file']['url']}">{$GLOBALS['threadfields']['mhdld_file']['filename']}</a></strong><br /> <span class="smalltext"> Downloads: {$GLOBALS['threadfields']['mhdld_file']['downloads_friendly']}<br /> Last Updated: {$GLOBALS['threadfields']['mhdld_file']['update_date']}, {$GLOBALS['threadfields']['mhdld_file']['update_time']}<br /> Uploader: {$post['profilelink']} </span>
Replace with:
HTML Code<strong>Download: {$GLOBALS['threadfields']['dld_file']}</strong><br /> <strong>Uploader:</strong> {$post['profilelink']}
- mhdld_forumdisplay_thread template:
HTML Code<tr> <td align="center" class="{$bgcolor}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td> <td align="center" class="{$bgcolor}" width="2%">{$icon}</td> <td class="{$bgcolor}"> {$attachment_count} <div> <span>{$prefix} {$gotounread}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span> {$GLOBALS['threadfields']['mhdld_desc']} </div> </td> <td align="center" class="{$bgcolor}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td> <td align="center" class="{$bgcolor}">{$thread['views']}</td> {$rating} <td class="{$bgcolor}" style="white-space: nowrap; text-align: right;"> <span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br /> <a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span> </td> {$modbit} </tr>
We don't need other template, because we can't count how many download for each file.
If we want to add other info for the file, for example: file size and version, we can add another textbox for it. But all of them should be filled manually when creating/editing a thread.
11-11-2010, 04:08 AM
Just a simple tips
We can "set" some conditionals to download the XThreads attachments.
This is a simple example for that, the minimum post to download file:
Use this kinds of code in File Upload Display Format field:
We can "set" some conditionals to download the XThreads attachments.
This is a simple example for that, the minimum post to download file:
Use this kinds of code in File Upload Display Format field:
HTML Code
|
We can set the conditional to download the attachments per thread/attachments basis. Just add custom thread fields for the setting.
11-20-2010, 01:49 PM
this is a nice mod
anyways just like to ask something
Is it possible to make an expiring links towards the Url of the file? in this case to avoid direct linking
anyways just like to ask something
Is it possible to make an expiring links towards the Url of the file? in this case to avoid direct linking
11-20-2010, 04:52 PM
Dynamic links, no.
You may be able to block hotlinking with a htaccess edit: http://altlab.com/htaccess_tutorial.html
(that checks for image extensions, you could remap it to xthreads_attach.php)
You may be able to block hotlinking with a htaccess edit: http://altlab.com/htaccess_tutorial.html
(that checks for image extensions, you could remap it to xthreads_attach.php)
11-20-2010, 10:01 PM
my point is just like vbulletin when the page is idle or inactive for an amount of time, all download links will expire then when clicked, the user will be forced to reload the page in order to reload the link
anyways thanks for the suggestion
anyways thanks for the suggestion
11-20-2010, 10:06 PM
As I said, XThreads doesn't do dynamic links. The design principle is that it allows content to be cached, and this cannot be done if links keep changing. I can't see many reasons why you'd want links to be dynamic, although you may have a good one, but unfortunately, XThreads doesn't support it.
If hotlink protection is all you wanted, then the above should be suffice, but if you want links to die after a period of time, it's not possible with this system.
Hope that helps.
If hotlink protection is all you wanted, then the above should be suffice, but if you want links to die after a period of time, it's not possible with this system.
Hope that helps.