Download System

Started by SMFHacks.com Team, October 31, 2007, 06:55:37 PM

Previous topic - Next topic

wintstar

Then I leave out this function. Thank you both  :)  A happy new year, I wish nor.
Regards Stephan

,,In order for the possible to come into being, the impossible must be attempted again and again."
Hermann Hesse (1877-1962)

My HomepageMy Board - My Atelier

wintstar

For installation to SMF 2.1 Beta* missing language into Modifikations.english*.php and Who.english*.php

open package-info.xml and find
Code (xml) Select
    <install for="2.1 - 2.1.99,2.1 Beta 1">
        <redirect url="?action=admin;area=downloads;sa=adminset">redirect.txt</redirect>
        <readme>ReadMe.txt</readme>


replace with
Code (xml) Select
    <install for="2.1 - 2.1.99,2.1 Beta 1">
        <redirect url="?action=admin;area=downloads;sa=adminset">redirect.txt</redirect>
        <readme>ReadMe.txt</readme>
        <modification type="file" reverse="true">downloadsbeta21.xml</modification>



Regards Stephan

,,In order for the possible to come into being, the impossible must be attempted again and again."
Hermann Hesse (1877-1962)

My HomepageMy Board - My Atelier

SMFHacks.com Team

Quote from: wintstar on December 29, 2015, 02:47:13 AM
For installation to SMF 2.1 Beta* missing language into Modifikations.english*.php and Who.english*.php

open package-info.xml and find
Code (xml) Select
    <install for="2.1 - 2.1.99,2.1 Beta 1">
        <redirect url="?action=admin;area=downloads;sa=adminset">redirect.txt</redirect>
        <readme>ReadMe.txt</readme>


replace with
Code (xml) Select
    <install for="2.1 - 2.1.99,2.1 Beta 1">
        <redirect url="?action=admin;area=downloads;sa=adminset">redirect.txt</redirect>
        <readme>ReadMe.txt</readme>
        <modification type="file" reverse="true">downloadsbeta21.xml</modification>




Fixed thanks!
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

@rjen

Installed the mod succesfully in my 2.1 test site. I am just missing a menu icon. The file drive.png is copied into the directory defaul /images/admin but is not showing in the menu...]

Could it be in the wrong folder?
 
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

vbgamer45

I forget if that issue is fixed with SMF in the latest beta or not. Could be in the wrong folder.
When I first wrote for beta 1 custom icons were not supported in the menu in SMF.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

@rjen

I tried to fix it by add extra  code in the index.css file. So far no luck
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

MESWEB

Download Template is not responsive for SMF 2.0.X. Can You fix CSS?

vbgamer45

Can't I am not good with css in that sense.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

@rjen

That is too bad. In 2.1 the entire theme is responsive. Now only the downloads pages are not...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

wintstar

Take a look at the differences between the original SMF Default Theme - Curve2  and this mod     Responsive Curve. Or check out the changes to the Theme between 2.0.11 and 2.1*.
Regards Stephan

,,In order for the possible to come into being, the impossible must be attempted again and again."
Hermann Hesse (1877-1962)

My HomepageMy Board - My Atelier

vbgamer45

If someone can do it for me that would be great. But I have zero time for SMF mods adding new stuff other than replying and maintaining what i have at this point.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

wintstar

Quote from: @rjen on January 02, 2016, 10:20:16 AM
Installed the mod succesfully in my 2.1 test site. I am just missing a menu icon. The file drive.png is copied into the directory defaul /images/admin but is not showing in the menu...]

Could it be in the wrong folder?


Change just only for SMF 2.1*

Add the icon drive.png to root/Themes/default/images/

open root/Sources/DownloadsHooks.php
find
Code (php) Select
    downloads_array_insert($menu_buttons, $button_insert,
             array(
                    'downloads' => array(
                    'title' => $txt['downloads_menu'],
                    'href' => $scripturl . '?action=downloads',
                    'show' => allowedTo('downloads_view'),
                    'icon' => '',
           
                   
                )   
            )
        ,$button_pos);
       



}

replace with
Code (php) Select
    downloads_array_insert($menu_buttons, $button_insert,
            array(
                    'downloads' => array(
                    'title' => $txt['downloads_menu'],
                    'href' => $scripturl . '?action=downloads',
                    'show' => allowedTo('downloads_view'),
                )
            )
        ,$button_pos);
}


open root root/Themes/default/css/index.css
Code (css) Select
Insert at the end
.generic_icons.downloads {
    background: url(../images/drive.png) no-repeat;
}


@vbgamer45, please wait with the new package. I still found something.
Regards Stephan

,,In order for the possible to come into being, the impossible must be attempted again and again."
Hermann Hesse (1877-1962)

My HomepageMy Board - My Atelier

vbgamer45

there should be a way without requiring a css file change if not the bug is still in Smf
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Illori

Quote from: vbgamer45 on January 02, 2016, 02:41:16 PM
there should be a way without requiring a css file change if not the bug is still in Smf

that is the way SMF adds the icons, so why is it a bug? that is the way it is coded to work.

vbgamer45

it shouldnt require file edits that is bad form if you are saying hooks are the way to go.  i mentioned it last year and they said it was a bug fixed for next beta
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

wintstar

#2075
   That's because generic_icons.png and

index.css
Code (css) Select
/* Some lovely generic icons.
------------------------------------------------- */
.generic_icons {
    width: 16px;
    height: 16px;
    display: inline-block;
    background: url(../images/generic_icons.png) no-repeat -5px -5px;
    vertical-align: middle;
}


Therefore, it will go not without any changes in the index.css. Or with its own download.css
Code (php) Select

       loadtemplate('Downloads2.1','downloads');
Regards Stephan

,,In order for the possible to come into being, the impossible must be attempted again and again."
Hermann Hesse (1877-1962)

My HomepageMy Board - My Atelier

wintstar

So that it is not necessary to insert the language strings in the Modifications.english.php, it requires two changes:

open root/Sources/DownloadsHooks.php
find
Code (php) Select
function downloads_load_permissions(&$permissionGroups, &$permissionList, &$leftPermissionGroups, &$hiddenPermissions, &$relabelPermissions)
{
    global $context;

add after
Code (php) Select
    // Load the language files
    if (loadlanguage('Downloads') == false)
        loadLanguage('Downloads','english');


find
Code (php) Select
function downloads_admin_areas(&$admin_areas)
{
global $txt, $modSettings, $scripturl;

add after
Code (php) Select
    // Load the language files
    if (loadlanguage('Downloads') == false)
        loadLanguage('Downloads','english');


That would no longer be necessary:
<modification type="file">downloadsbeta21.xml</modification>[/code]

Is missing is a solution for
Code (xml) Select
<file name="$languagedir/Who.english.php">
I will find even
Regards Stephan

,,In order for the possible to come into being, the impossible must be attempted again and again."
Hermann Hesse (1877-1962)

My HomepageMy Board - My Atelier

wintstar

That the Soloution

Upper Post is lapsed

So that it is not necessary to insert the language strings in the Modifications.english.php, it requires two changes:

open root/Sources/DownloadsHooks.php

That would no longer be necessary:
Code (php) Select
<modification type="file">downloadsbeta21.xml</modification>

Code (php) Select
// Hook Add Action
function downloads_actions(&$actionArray)
{
global $sourcedir, $modSettings, $txt;

add after
Code (php) Select
    // Load the language files
    if (loadlanguage('Downloads') == false)
        loadLanguage('Downloads','english');


open root/Themes/default/languages/Downloads.english.php
find
Code (php) Select
Links to http://www.smfhacks.com must remain unless
branding free option is purchased.
#############################################

Downloads English Text Strings
*/

add after
Code (php) Select
global $scripturl;

add at the End of the file
Code (php) Select
// Begin Download System Text Strings
$txt['downloads_menu'] = 'Downloads';
$txt['downloads_admin'] = 'Downloads Configuration';
$txt['downloads_text_settings'] = 'Settings';

$txt['downloads_form_approvedownloads'] = 'Approve Downloads';
$txt['downloads_form_reportdownloads'] = 'Reported Downloads';
$txt['downloads_form_approvecomments'] = 'Approve Comments';
$txt['downloads_filespace'] = 'File Space Manager';
$txt['downloads_text_catpermlist2'] = 'Category Permissions';
$txt['downloads_txt_import'] = 'Import';

// Permissions
$txt['permissiongroup_downloads'] = 'Downloads System';
$txt['permissiongroup_simple_downloads'] = 'Downloads System';

$txt['permissionname_downloads_view'] = 'View Downloads';
$txt['permissionhelp_downloads_view'] = 'Allows the user to view the Downloads';
$txt['cannot_downloads_view'] = 'You are not allowed to view the Downloads';

$txt['permissionname_downloads_add'] = 'Add Download';
$txt['permissionhelp_downloads_add'] = 'Allows the user to add a download.';
$txt['cannot_downloads_add'] = 'You are not allowed to add a download.';

$txt['permissionname_downloads_edit'] = 'Edit own Download';
$txt['permissionhelp_downloads_edit'] = 'Allows the user to edit their own download.';
$txt['cannot_downloads_edit'] = 'You are not allowed to edit that download';

$txt['permissionname_downloads_delete'] = 'Delete own Download';
$txt['permissionhelp_downloads_delete'] = 'Allows the user to delete their own download.';
$txt['cannot_downloads_delete'] = 'You are not allowed to delete that download.';

$txt['permissionname_downloads_ratefile'] = 'Rate Downloads';
$txt['permissionhelp_downloads_ratefile'] = 'Allows the user to rate a file.';
$txt['cannot_downloads_ratefile'] = 'You are not allowed to rate that file.';

$txt['permissionname_downloads_editcomment'] = 'Edit own Comment';
$txt['permissionhelp_downloads_editcomment'] = 'Allows the user to edit their own comments.';
$txt['cannot_downloads_editcomment'] = 'You are not allowed to edit that comment.';

$txt['permissionname_downloads_comment'] = 'Leave Comments';
$txt['permissionhelp_downloads_comment'] = 'Allows the user to leave comments on a download.';
$txt['cannot_downloads_comment'] = 'You are not allowed to leave comments.';

$txt['permissionname_downloads_report'] = 'Report Pictures/Comments';
$txt['permissionhelp_downloads_report'] = 'Allows the user to report downloads and comments.';
$txt['cannot_downloads_report'] = 'You are not allowed to report content.';

$txt['permissionname_downloads_autocomment'] = 'Auto Approve Comments';
$txt['permissionhelp_downloads_autocomment'] = 'Comments do not need to wait for approval.';

$txt['permissionname_downloads_autoapprove'] = 'Auto Approve Downloads';
$txt['permissionhelp_downloads_autoapprove'] = 'Downloads do not need to wait for approval.';


$txt['permissionname_downloads_manage'] = 'Admin Download System';
$txt['permissionhelp_downloads_manage'] = 'Allows the user to add/delete/edit all catagories. Delete Comments, Delete Downloads, Approve Downloads';
$txt['cannot_downloads_manage'] = 'You are not allowed to manage the downloads.';

// Begin Download System
$txt['whoall_downloads'] = 'In the <a href="' . $scripturl . '?action=downloads">Downloads</a>';
// END Download System Strings



Bug fix for
httpxxxx:xxxxx//localhost/smf21/index.php?

File: C:/xampp/htdocs/smf21/Sources/DownloadsHooks.php
Line: 100 
Type of error: Undefined
  8: Undefined index: downloads_menu

find
Code (php) Select
    downloads_array_insert($menu_buttons, $button_insert,
            array(
                    'downloads' => array(
                    'title' => $txt['downloads_menu'],

replace with
Code (php) Select
    downloads_array_insert($menu_buttons, $button_insert,
            array(
                    'downloads' => array(
                    'title' => $txt['downloads'],


Edit 2.1.2016  22:14
Regards Stephan

,,In order for the possible to come into being, the impossible must be attempted again and again."
Hermann Hesse (1877-1962)

My HomepageMy Board - My Atelier

SMFHacks.com Team

Update 2.6
!Fixed icon for SMF 2.1 Beta 2
!Fixed some things for SMF 2.1 Beta 2
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

vbgamer45

Found the workaround for no css images.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: