Results 1 to 7 of 7

Thread: Module "The latest downloads"

  1. #1
    User tetrijeb's Avatar
    Join Date
    04-19-12.
    Location
    Bosnia&Herzegovina
    Posts
    114

    Default Module "The latest downloads"

    Is there some module that could show recently added files in frontend, something like "recently added documents"?

    It's a really simple query from the base:

    Code:
    select singleSRC, linkTITLE from tl_content where type='download' order by tstamp desc limit 5"
    but I don't know how to make a module or extension for frontend.
    Last edited by tetrijeb; 08/14/2014 at 09:09. Reason: text formatting

  2. #2

    Default

    Hello :-)

    You have a extension creator in your back office. It's a very simple thing to do ;-)
    The hardiest part is to program your PHP and your SQL, and you already have your SQL.

    To execute une request in FrontEnd, you can use :
    PHP Code:
    \Database::getInstance()->prepare('your_request')->execute() 
    And in your case, if you want to limit results, just add
    PHP Code:
    \Database::getInstance()->prepare('your_request')->limit(your_limit)->execute() 

  3. #3
    User tetrijeb's Avatar
    Join Date
    04-19-12.
    Location
    Bosnia&Herzegovina
    Posts
    114

    Default

    Quote Originally Posted by Lupus View Post
    Hello :-)

    You have a extension creator in your back office. It's a very simple thing to do ;-)
    The hardiest part is to program your PHP and your SQL, and you already have your SQL.
    Hi,

    I didn't know for that extension.

    Thanks for your reply!

    However, I would for sure, need some time to find useful tutorial and study it more carefully. Despite my query is being quite simple, and there is no need for additional, non-existing tables, PHP file could be a problem.

    PS. For tutorial, I found this: http://de.contaowiki.org/Kategorie:T...on-Entwicklung
    Last edited by tetrijeb; 08/13/2014 at 12:40. Reason: post scriptum

  4. #4

    Default

    Hum, I don't speak German and the traduction of Google seems to be...

    Read this blog : http://blog.qzminski.com/article/cre...he-basics.html

    Create Contao modules is very simple if you know your basics ;-)

  5. #5
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    You can show datasets from every table in FE with the FE listing module. It's on board.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  6. #6
    User tetrijeb's Avatar
    Join Date
    04-19-12.
    Location
    Bosnia&Herzegovina
    Posts
    114

    Default

    Quote Originally Posted by Andreas View Post
    You can show datasets from every table in FE with the FE listing module. It's on board.
    Excellent, that is what I was looking for.

    Still, I have to made some modification to list_default file, since I don't need search form, etc. but that should be easier than creating my own module.

    Thanks.
    Last edited by tetrijeb; 08/14/2014 at 10:47.

  7. #7
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    Yes, with this module the template is just an example. In nearly all cases you have to create your own template for the listing module.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •