Sep 06, 2008 | 06:05 AM  
Welcome

Don't have an account yet? You can create one, it is free, just click here

as a registered user you have some advantages like free downloads, comments and posting on our forums, depending upon this site's configuration and options.

 • •  Control Panel - Register - Login  • • 
Current Stable MDPro Lite 1.0821 Download
  Forum FAQForum FAQ   SearchSearch  UsergroupsUsergroups  PreferencesPreferences  Options forumOptions forum  Watched TopicsWatched Topics  Watched ForumsWatched Forums
Latest forum posts Latest forum posts  Log in to check your private messages Log in to check your private messages    Log inLog in 
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
callisto
MD NewNew
MD NewNew


Joined: Oct 17, 2007
Posts: 4
Location: Poland
Member
Post  Posted: July 09, 2008 - 01:01 PM Reply with quote Back to top

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
View user's profile Visit poster's website
Bonzo
MD user level 5
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
Post  Posted: July 15, 2008 - 11:11 PM Reply with quote Back to top
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
View user's profile Visit poster's website
Bonzo
MD user level 5
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
Post  Posted: July 15, 2008 - 11:43 PM Reply with quote Back to top
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
View user's profile Visit poster's website
callisto
MD NewNew
MD NewNew


Joined: Oct 17, 2007
Posts: 4
Location: Poland
bannato
Post  Posted: July 17, 2008 - 06:46 PM Reply with quote Back to top

I changed, done.. Tommorow upgrade to version 81 and next 83!!!
Thanks Bonzo!

_________________
http://www.audiophile.pl/en/produkty.htm
site map for subjects: all category | subcategory | page
View user's profile Visit poster's website
Bonzo
MD user level 5
MD user level 5


Joined: Sep 15, 2004
Posts: 55
Location: Rome - Italy
bannato
Post  Posted: July 17, 2008 - 11:23 PM Reply with quote Back to top
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
View user's profile Visit poster's website
Display posts from previous:     
Jump to:  
All times are GMT + 13 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by MDForum 2.0.8© 2003-2007 MAXdev Team
Credits