Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
w2ibc
Newbie
Newbie



Joined: Jul 14, 2009
Posts: 19

PostPosted: Sun Mar 31, 2013 5:16 am Reply with quote

1st. Now I am working on localhost debian. Building up something for future use but want to get all I can done via local before I even bother going live with it.

Now on file upload to work you define folder in the create cat. how is that officially set?

If i want uploads to go to folder say files do I enter it in as
/files/

or

files/

Or would I have to define the entire url? like www.blah.com/files/

Also.

When you are at downloads main page. Is there a way I can have it just list the Main cats. Instead of showing all the sub cats below the main. (when you have 30+ subs it makes the main dl page look very poor IMO.)

Sub cats still there but to see them you have to click on the parent cat.

thanks
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Mar 31, 2013 11:29 am Reply with quote

w2ibc,

Regarding your first question on the upload path. The field name on the page states this is a "Relative Path", so that would be relative to your *nuke root. In your example, if "files" is a directory right off your root, just like "modules" and "themes" for example, then you would use your second example of just "files/"... not 100% sure, but you may not need the extra "/" on the end. You would need to just test to see.

Regarding your second question around the sub-categories, unfortunately that is not a configuration setting. However, you could potentially try this.

=== OPEN FILE ===

modules/Downloads/public/index.php

=== FIND THIS CODE ===

Code:

      $space = 0;
      $sql = 'SELECT `cid`, `title` FROM `' . $prefix . '_nsngd_categories` WHERE `parentid` = ' . $cidinfo2['cid']
         . ' AND `active` > 0 ORDER BY `title`';
      $result3 = $db->sql_query($sql);
      while ($cidinfo3 = $db->sql_fetchrow($result3)) {
         if ($dl_config['show_links_num'] == 1) {
            $sql = 'SELECT * FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = ' . $cidinfo3['cid'] . ' AND `active` > 0';
            $snumrows = $db->sql_numrows($db->sql_query($sql));
            $categoryinfosub = getcategoryinfo($cidinfo3['cid']);
            $cnum = ' (' . $snumrows . '/' . $categoryinfosub['downloads'] . ')';
         } else {
            $cnum = '';
         }
         $myimage = myimage('icon+.png');
         echo '  <img align="middle" src="' . $myimage . '" border="0" height="16" width="16" alt="" />';
         echo '<a href="modules.php?name=' . $module_name . '&amp;cid=' . $cidinfo3['cid'] . '">'
            . htmlspecialchars($cidinfo3['title'], ENT_QUOTES, _CHARSET) . '</a>' . $cnum;
         newcategorygraphic($cidinfo3['cid']);
         echo '<br />';
         $space++;
      }


=== REPLACE WITH THIS CODE ===

Code:

      if ($cid != 0) {
         $space = 0;
         $sql = 'SELECT `cid`, `title` FROM `' . $prefix . '_nsngd_categories` WHERE `parentid` = ' . $cidinfo2['cid']
            . ' AND `active` > 0 ORDER BY `title`';
         $result3 = $db->sql_query($sql);
         while ($cidinfo3 = $db->sql_fetchrow($result3)) {
            if ($dl_config['show_links_num'] == 1) {
               $sql = 'SELECT * FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = ' . $cidinfo3['cid'] . ' AND `active` > 0';
               $snumrows = $db->sql_numrows($db->sql_query($sql));
               $categoryinfosub = getcategoryinfo($cidinfo3['cid']);
               $cnum = ' (' . $snumrows . '/' . $categoryinfosub['downloads'] . ')';
            } else {
               $cnum = '';
            }
            $myimage = myimage('icon+.png');
            echo '  <img align="middle" src="' . $myimage . '" border="0" height="16" width="16" alt="" />';
            echo '<a href="modules.php?name=' . $module_name . '&amp;cid=' . $cidinfo3['cid'] . '">'
               . htmlspecialchars($cidinfo3['title'], ENT_QUOTES, _CHARSET) . '</a>' . $cnum;
            newcategorygraphic($cidinfo3['cid']);
            echo '<br />';
            $space++;
         }
      }


=== FINISHED ===

I have not tested this, so you'll need to make sure it works properly at every level. The above should only remove the sub-categories when you are at the Main level (hopefully).

Let me know how this works please.

Thanks!
 
View user's profile Send private message Visit poster's website
w2ibc
Newbie
Newbie



Joined: Jul 14, 2009
Posts: 19

PostPosted: Sun Mar 31, 2013 10:13 pm Reply with quote

Well the sub-cat hack works!

Ill have to play with the file uploads a bit more. Still giving me errors. ill have to turn on error reporting see whats going on with that in a bit.

thanks!

ill post more when I get some extra time to play later tonight or marrow with my upload findings
 
View user's profile Send private message
hicux
Newbie
Newbie



Joined: Jan 30, 2009
Posts: 92
Location: NL

PostPosted: Mon Apr 01, 2013 3:40 pm Reply with quote

I tested this hack and it works but it is not important in my eyes and it looks like there isn't any files at all in the download modules. U need to click severals times instead of going directly where you should go but what it could be nice to show is: How many files every category or sub-category has. Example:

Nuke(category)
(sub-category)blocks(3)

Note: The number indicates how many files that subcategory has. Is that possible to show Montego?

Is it difficult to show comments or use disqus on download files?
 
View user's profile Send private message Visit poster's website
w2ibc
Newbie
Newbie



Joined: Jul 14, 2009
Posts: 19

PostPosted: Tue Apr 02, 2013 6:07 pm Reply with quote

hicux wrote:
I tested this hack and it works but it is not important in my eyes and it looks like there isn't any files at all in the download modules. U need to click severals times instead of going directly where you should go but what it could be nice to show is: How many files every category or sub-category has. Example:

Nuke(category)
(sub-category)blocks(3)

Note: The number indicates how many files that subcategory has. Is that possible to show Montego?

Is it difficult to show comments or use disqus on download files?


If you dont have many sub-cats I wouldnt of bothered. but I got one cat that will have about 50+ subs and it does make the downloads look a bit tackey like that.

The main cat number should show how many files are in the main cat and subs. as it does on this site

TegoNuke(tm) ShortLinks (1/13)

1 dl in the main and 13 in the subs.


Also as per my uploads issue. it appears I may have some wierd linux permission thing going on. still got to really dig into it havent been feeling well so have not bothered.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Thu Apr 04, 2013 9:24 am Reply with quote

w2ibc wrote:
it appears I may have some wierd linux permission thing going on. still got to really dig into it havent been feeling well so have not bothered.


First of all, sorry to hear that you are not feeling well. Hope you feel better soon.

File uploads can definitely be tricky as they are so environment dependent. In other words, so many possible differences and settings. Very difficult without knowing your set up you are working on. Some questions:

1) How much control do you have over file system permissions from /home onward?

2) How much control do you have over Apache and PHP configuration?

3) How is PHP running? I.e., is it running like a CGI (separate instance kicked of for every request), or running as an embedded Apache module? Or are you using something like suEXEC?
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Thu Apr 04, 2013 9:28 am Reply with quote

hicux wrote:
Is it difficult to show comments or use disqus on download files?


Neither are currently on the road-map because the RN Team, for quite some time now, has discussed on occasion the desire to have a site-wide commenting capability. It would make a lot of sense to allow the site owner to simply select which modules (i.e., content) to add commenting features to. Therefore, I am hesitant to address for now.

You are certainly welcome to try and add Disqus. I believe Nuken has done some work with this related to the News module. He may have done even more than that.
 
View user's profile Send private message Visit poster's website
hicux
Newbie
Newbie



Joined: Jan 30, 2009
Posts: 92
Location: NL

PostPosted: Thu Apr 04, 2013 10:47 am Reply with quote

I forgot to Show # of items for each category

Admin/Dowload/Downloads Configuration/

Show # of items for each category: YES

as default it shows NO. That's why I didn't see it. lol
 
View user's profile Send private message Visit poster's website
w2ibc
Newbie
Newbie



Joined: Jul 14, 2009
Posts: 19

PostPosted: Thu Apr 04, 2013 9:57 pm Reply with quote

montego wrote:
w2ibc wrote:
it appears I may have some wierd linux permission thing going on. still got to really dig into it havent been feeling well so have not bothered.


First of all, sorry to hear that you are not feeling well. Hope you feel better soon.

File uploads can definitely be tricky as they are so environment dependent. In other words, so many possible differences and settings. Very difficult without knowing your set up you are working on. Some questions:

1) How much control do you have over file system permissions from /home onward?

2) How much control do you have over Apache and PHP configuration?

3) How is PHP running? I.e., is it running like a CGI (separate instance kicked of for every request), or running as an embedded Apache module? Or are you using something like suEXEC?


yea it was simple. I didnt give www-data permissions to write in the folders. I should have seen that faster but not feeling well kinda made me miss the obvious. strange how when you are not 100% you miss the little stuff you should have known lol.

But I do control everything on the machine. its sitting under the table here.

also in the folder upload in the cat. I define them without the / and it works so /home/user/www/html/files/ is just defined files
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri Apr 05, 2013 8:50 am Reply with quote

Great! Thanks for the updates guys.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
w2ibc
Newbie
Newbie



Joined: Jul 14, 2009
Posts: 19

PostPosted: Mon Apr 08, 2013 7:48 am Reply with quote

now goes the long process of building a site from scratch..
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Tue Apr 09, 2013 8:50 am Reply with quote

Enjoy and good luck with your project!

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunchlinear-bunch
linear-bunch