| Author |
Message |
callisto
MD NewNew

Joined: Oct 17, 2007
Posts: 4
Location: Poland
Member
|
 Posted:
July 09, 2008 - 01:01 PM |
|
|
Thanks! ! Your english is fantastic, I use google translator - my support :p I have another problem..
Module: subjects
this my code :
subcategories :
| Code:
|
if (!$page) {
$page = 1;
}
$pagesperlistview = $subjectsconfig['pagesperlistview'];
$pageslimit = $page * $pagesperlistview;
$pageslimit = $pageslimit - $pagesperlistview;
if($page > 1){
$pagefrom = $pageslimit + 1;
} else {
$pagefrom = $pageslimit;
}
if($pagefrom == 0){
$pagefrom = $pagefrom + 1;
}
//modified for Oracle compatibility
$sql = "SELECT $column[pageid], $column[pagetitle], $column[pageimage],
$column[pagetext], $column[pageauthor], $column[pageauthoremail],
$column[pageauthorurl], $column[pagedatetime], $column[pagecounter],
$column[reviewactive], $column[reviewscount], $column[reviewsscore]
FROM $pntable[subpages]
WHERE $column[parentpageid]=0 AND $column[subid]=$subid AND
$column[pageactive] = 1 AND $column[pagedatetime] < '$now'
ORDER BY $orderbycolumn $column[pageorder]";
// LIMIT $pageslimit, $pagesperlistview";
// $result = $dbconn->Execute($sql);
$result = $dbconn->SelectLimit($sql, $pagesperlistview, $pageslimit);
if ($dbconn->ErrorNo() != 0) {
$output->Text(_SUB_TELLADMIN . _DBSELECTERROR . ": " . $sql);
return $output->GetOutput();
}
if (!$result->EOF) {
//modified for Oracle compatibility
// while(list($pageid, $pagetitle, $pageimage, $pagetext, $pageauthor, $pageauthoremail, $pageauthorurl, $pagedatetime, $pagecounter, $reviewactive, $reviewscount, $reviewsscore) = $result->fields) {
$html_output.="<tr>"
."<td><h1><font><strong>$subname</strong></font>";
$html_output.= " <br><div><i>Items: </i>$pagesattached. $subtext - <i>Hits: </i>$subtext</div></td></tr>";
|
categories:
| Code:
|
function subjects_user_listcat()
{
global $pnconfig;
$dbtype = $pnconfig['dbtype'];
$output = new pnHTML();
$output->SetInputMode(_PNH_VERBATIMINPUT);
$html_output="";
$catid = pnVarCleanFromInput('catid');
if (!pnModAPILoad('subjects', 'user')) {
$output->Text(_LOADFAILED);
return $output->GetOutput();
}
list($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();
$sitename = pnConfigGetVar('sitename');
$currentlang = pnUserGetLang();
//TiMax
$pagespath=pnModGetVar('subjects', 'pagespath');
if (!pnModAPIFunc('subjects','user','auth',array('perm'=>ACCESS_OVERVIEW, 'catid'=>$catid))) {
$output->Text(_SUB_NOAUTHCAT);
return $output->GetOutput();
}
$html_output.=pnModAPIFunc('subjects', 'user', 'tablestart');
if (pnConfigGetVar('multilingual') == 1) {
$column = &$pntable['subjects_column'];
//modified for Oracle compatibility
$querylang = "AND ($column[sublanguage]='$currentlang' OR $column[sublanguage]='' OR $column[sublanguage] IS NULL)";
} else
$querylang = "";
$column = &$pntable['subjects_column'];
$column2 = &$pntable['subcategories_column'];
//modified for Oracle compatibility
switch ($dbtype){
case "oci8":
$sql = "SELECT $column[subid], $column2[catid], $column2[catname],
$column2[cattext], $column[subname],
$column[subtext], $column[subimage], $column[subcounter]
FROM $pntable[subjects],$pntable[subcategories]
WHERE $column[catid]=$column2[catid](+)
AND $column[catid]=$catid AND $column[subactive] = 1 $querylang
ORDER BY nvl($column2[catorder],0), $column[suborder]";
break;
default:
$sql = "SELECT $column[subid], $column2[catid], $column2[catname],
$column2[cattext], $column[subname],
$column[subtext], $column[subimage], $column[subcounter]
FROM $pntable[subjects]
LEFT JOIN $pntable[subcategories]
ON $column[catid]=$column2[catid]
WHERE $column[catid]=$catid AND $column[subactive] = 1 $querylang
ORDER BY $column2[catorder], $column[suborder]";
break;
}
$result = $dbconn->Execute($sql);
if ($dbconn->ErrorNo() != 0) {
$output->Text(_SUB_TELLADMIN . _DBSELECTERROR . ": " . $sql);
return $output->GetOutput();
|
and this subcategories put in "subtext": ( not result. Text subcategories only in categories ) I must change "Oracle compatibility" in subcategory? how?
| Code:
|
$html_output.="<tr>"
."<td><h1><font><strong>$subname</strong></font>";
$html_output.= " <br><div><i>Items: </i>$subtext<i>Hits: </i>$subcounter. </div></td></tr>";
|
|
_________________ http://www.audiophile.pl/en/produkty.htm
site map for subjects: all category | subcategory | page |
|
|
 |
Bonzo
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
|
 Posted:
July 15, 2008 - 11:11 PM |
|
| Post subject: Posting Guidelines: open a thread for each singular problem |
When posting a new problem you have to open another thread with the title for your problem and not write continuously all your problems on the same thread.
Otherwise your post will be visible in a thread with different subject from your problem and this creates confusion for users who would like to give you an answer.
Maybe it's better if you read the Posting Guidelines: http://www.maxdev.com/MDForum-rules.phtml
I put your last post in a new discussion.
So the answers to your last question will continue in this new thread
Greetings |
_________________ Bonzo (aka Matteo Carletti)
www.isartegiovagnoli.com - Istituto Statale d'Arte di Sansepolcro e Anghiari
www.agriturismoilsasso.it || www.agriturismoanghiari.it
www.beccacciaiditalia.com |
|
|
 |
Bonzo
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
|
 Posted:
July 15, 2008 - 11:43 PM |
|
| Post subject: MDPro 1.076 is not supported |
However coming to your problem you had already said that the version 1.076 of MDPro is no longer supported (and I have already explained the cause).
Then you should update your site to the latest version of MDPro, the 1.0821 version.
It 'difficult to give solutions to problems in a version so old.
From a long time the staff of this community is not working to version 1.076.
So, you can consult the archive of this forum and see if your question has already been treated in the past. Search your problem from here:
http://www.maxdev.com/MDForum-search.phtml
Greetings |
_________________ Bonzo (aka Matteo Carletti)
www.isartegiovagnoli.com - Istituto Statale d'Arte di Sansepolcro e Anghiari
www.agriturismoilsasso.it || www.agriturismoanghiari.it
www.beccacciaiditalia.com |
|
|
 |
callisto
MD NewNew

Joined: Oct 17, 2007
Posts: 4
Location: Poland
bannato
|
 Posted:
July 17, 2008 - 06:46 PM |
|
|
|
|
 |
Bonzo
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
|
 Posted:
July 17, 2008 - 11:23 PM |
|
| Post subject: Upgrade from MDPro 1.076 to 1.0821 version |
Excellent choice!!
The upgrade will require some time, but believe me that to the end you will be fully satisfied.
Also you can use all the latest news from the new version:
- Greater security
- Code optimized and faster
- Modules with new features
- ....and more On this site and on packages's upgrade you will find all the necessary instructions.
Also here on the forum the topic was discussed dozens of times, just do a search.
Greetings |
_________________ Bonzo (aka Matteo Carletti)
www.isartegiovagnoli.com - Istituto Statale d'Arte di Sansepolcro e Anghiari
www.agriturismoilsasso.it || www.agriturismoanghiari.it
www.beccacciaiditalia.com |
|
|
 |
|
|
|