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
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: 18/07/2009 01:54
Help with block
#post21289
Members, staff, I am trying to create a new block to the Calendar of Events, but again I was lost. Well, what I am trying to create is a block to the center (main), but without the calendar, displaying only the texts of events, exactly as it appears on the page of each event when you click with your date and everything, but I could not do, I pull the text for the block, I ask you to help me, but not an obligation. the Code, if I mistake here:
code
function showEvents($ofsbgn,$ofsppg,$pg,$year,$month,$day) {
        global $dblink,$siteConfig,$userid;
       
    if (isAuth($userid,3)) {
        echo "<div align='center' style='padding-bottom:4px;'><a href='http://www.memht.com/index.php?page=calendar&op=newevent' title='"._NEWEVENT_."'><b>"._NEWEVENT_."</b></a></div>";
        }
       
        if ($result = $dblink->get_list("SELECT * FROM memht_calendar_events WHERE YEAR(date)=$year AND MONTH(date) = $month AND DAYOFMONTH(date) = $day ORDER BY id DESC LIMIT $ofsbgn,$ofsppg")) {
                foreach ($result as $row) {
                        $id = intval($row['id']);
                        $date = outCode($row['date']);
                        $title = outCode($row['title'],0);
                        $text = censure(bb2html(outCode($row['text'],0)));
                        $author = outCode($row['author']);
                        $ip = outCode($row['ip']);
                       
                        $info = _BY_." <a href='http://www.memht.com/users_info_$author.html' title='$author'>$author</a>";
                        $op = (isAuth($userid,3)) ? " <a href='http://www.memht.com/index.php?page=calendar&op=delete&id=$id' title='"._DELETE_."'>("._DELETE_."Smile</a>" : "" ;
                                               
                        $cdate = explode(" ",$date);
                        $cdate = explode("-",$cdate[0]);
                        $cday = $cdate[2];
                        $cmonth = numToMonth($cdate[1]);
                        $cyear = $cdate[0];
                       
                        echo "<div class='box'>\n";
                                echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
                                        echo "<tr>\n";
                                                echo "<td width='5%' style='padding-right:10px;' align='center' valign='top' nowrap>\n";
                                                        echo "<div style='font-size:200%;' valign='top'><b>$cday</b></div>";
                                                        echo "<div>$cmonth</div>";
                                                        echo "<div>$cyear</div>";
                                                echo "</td>\n";
                                                echo "<td width='95%' valign='top'><div><span style='padding-bottom:4px; font-size:140%;'><b>$title</b></span> <span id='info'>$info</span>$op</div><div>$text</div></td>\n";
                                        echo "</tr>\n";
                                echo "</table>\n";
                        echo "</div>\n";
                }
        } else {
                echo "<div align='center' id='errorText' class='box'><b>"._EMPTY_."</b></div>\n";
        }
 


this is the function I want to create a central block, this is the same function for events of the page originally. But I can not make it appear in the block, someone please help me? Thank you very much
..::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
 
sisnox
Moderator
Developer


Posts: 1675
Contributes: 944

Gender: _MALE_
Online: No

Version: 5
Country: Portugal
Languages: Portuguese and english
Date: 18/07/2009 11:52
Re: Help with block
#post21295
Viva slashado

Para fazeres isso não precisas de usar essa função.
Basta apenas chamares a query com a tabela dos eventos.

Se não perceberes grita.

Abraços
http://www.sisnox.com
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: 18/07/2009 19:41
Re: Help with block
#post21307
Viva Paulo... Saudades de você.
Então basta fazer uma chamada na tabela...
Vou tentar fazê-lo e retorno logo em seguida com os resultados!
Paulo, lhe enviei um email a algum tempo sobre o "Blocks Comment" que não está mais disponível aqui para download. Tenho procurado muito esse bloco, tanto para colocar na Comunidade Brasileira que já me pediram muito, e também em meu site, você ainda o tem? Você pode me fornecer esse bloco? lembro de tê-lo visto na Comunidade Portuguesa! Se poder me envia por email ou aqui mesmo no Fórum!
Super abraços!
..::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: 18/07/2009 20:29
Re: Help with block
#post21308
Paulo...
Quando se referiu a Chamar a QUERY com a tabela, quis dizer fazer uma conexão e capturar os dados separadamente ou capturar a função da página?
..::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: 20/07/2009 02:06
Re: Help with block
#post21320
Paulo... não consegui fazerSmile

Me dá uma dica???
..::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.232

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