MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completely customizable, expandable and suitable for all needs.
Moderators: Moderators
Forum RSS feedReply
Help with Block Gallery
AuthorText
slashado
Donator

Posts: 323
Contributes: 350

Gender: _MALE_
Online: No

Version: 4.0.1
Country: Brasil
Languages: Português, Inglês (via Google), e todas as outras (via google)
Date: 13/08/2009 20:51
Help with Block Gallery
#post21737
Site url: http://www.mscriacoes.com.br
MemHT version:4.0.1
Hosting OS: Linux
PHP and MySQL versions:5/5
Installed addons/scripts: YES
Error/Problem: Gallery



Hello again friends, Mem, Paulo.

I was trying to change a silly, but I just did not know.

Well, I'm trying to change the BLOCK GALLERY to view only one category and not all.

That why I would like to exhibit a different category on different pages, I will manually insert the pages in the future, but did not change.

block_gallery.php
code

        if ($resultg = $dblink->get_list("SELECT * FROM memht_gallery_images AS i JOIN memht_gallery_categories AS c ON i.category=c.id WHERE i.enabled=1 ORDER BY RAND() LIMIT 1")) {
                foreach ($resultg as $rowg) {
                        $icat = intval($rowg['category']);
                        $ititle = outCode($rowg['title']);
                        $iimgfile = outCode($rowg['imgfile']);
                        $ithumb = outCode($rowg['thumb']);
                        $iattachfile = outCode($rowg['attachfile']);
                        $idescription = outCode($rowg['description']);
       
                        $ctitle = outCode($rowg['name']);
 


How should I do to show that exactly one category, and not random as is this code? I tried some changes but not got success.

Something like "Category ID 1 or 5 or 10" specifically?
..::MS Criações::.. - Criação e Hospedagem de Websites!
..::Memht BRASIL::.. - Comunidade brasileira do MemHT!
Soon, Virtual Store with Modules and Templates for MemHT!
Eager for MemHT 5
Delete Edit Quote
 
slashado
Donator

Posts: 323
Contributes: 350

Gender: _MALE_
Online: No

Version: 4.0.1
Country: Brasil
Languages: Português, Inglês (via Google), e todas as outras (via google)
Date: 13/08/2009 21:20
Re: Help with Block Gallery
#post21738
let it go ... my head and decided to run it again doing what I wanted, thanks guys!Smile

I'll post what I did if someone else appears with the same question!

code
if ($resultg = $dblink->get_list("SELECT * FROM memht_gallery_images AS i JOIN memht_gallery_categories AS c ON i.category=c.id WHERE i.enabled=1 ORDER BY RAND() LIMIT 1"))


to

code
if ($resultg = $dblink->get_list("SELECT * FROM memht_gallery_images AS i JOIN memht_gallery_categories AS c ON i.category=24 WHERE i.enabled=1 ORDER BY i.id DESC LIMIT 1"))


SmileSmileSmile
..::MS Criações::.. - Criação e Hospedagem de Websites!
..::Memht BRASIL::.. - Comunidade brasileira do MemHT!
Soon, Virtual Store with Modules and Templates for MemHT!
Eager for MemHT 5
Delete Edit Quote
 
Reply
Twitter updates...
MemHT Wiki
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.107.179.230

Username
Password
Language
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo