JohnCMS 4.0 Official English Release

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    Does anyone know how to fix this? I want to display top 50 downloaded files . The files are displayed , but only those who were downloaded less than 10 times (like 9,8,7..etc)Here is the php code. Thanks
    PHP Code:
    <?php


    define
    ('_IN_JOHNCMS'1);
    $headmod 'loadtop';
    require_once (
    "../incfiles/core.php");
    $filesroot "../download";
    $loadroot "$filesroot/files";
    $cat intval($_GET['cat']);
    $sort $_GET['sort'];
    require_once (
    "../incfiles/head.php");

    echo
    '<div class="phdr">Top 50</div>';
        
    $req mysql_query("SELECT * FROM `download` ORDER BY `download`.`ip` DESC LIMIT 0 , 50");
        
    $total mysql_result($req0);

             
    $zap mysql_query("SELECT * FROM `download` ORDER BY `download`.`ip` DESC LIMIT 0 , 50");

        while (
    $newf mysql_fetch_array($zap)) {
            echo 
    $i '<div class="list2">' '<div class="list1">';
            
    $fsz filesize("$newf[adres]/$newf[name]");
            
    $fsz round($fsz 10242);
            
    $ft functions::format("$newf[adres]/$newf[name]");
            switch (
    $ft) {
                case 
    "mp3" :
                    
    $imt "mp3.png";
                    break;
                case 
    "zip" :
                    
    $imt "rar.png";
                    break;
                case 
    "jar" :
                    
    $imt "jar.png";
                    break;
                case 
    "gif" :
                    
    $imt "gif.png";
                    break;
                case 
    "jpg" :
                    
    $imt "jpg.png";
                    break;
                case 
    "png" :
                    
    $imt "png.png";
                    break;
                default :
                    
    $imt "file.gif";
                    break;
            }
            if (
    $newf['text'] != "") {
                
    $tx $newf['text'];
                if (
    mb_strlen($tx) > 100) {
                    
    $tx mb_substr(strip_tags($tx), 090);

                    
    $tx "<br/>$tx...";
                }
                else {
                    
    $tx "<br/>$tx";
                }
            }
            else {
                
    $tx "";
            }
            echo 
    '<img src="' $filesroot '/img/' $imt '" alt=""/><a href="index.php?act=view&amp;file=' $newf['id'] . '">' htmlentities($newf['name'], ENT_QUOTES'UTF-8') . '</a> (' $fsz ' Kb)' $tx '<br/>';
            
    $nadir $newf['refid'];
            
    $pat "";
            while (
    $nadir != "") {
                
    $dnew mysql_query("select * from `download` where type = 'cat' and id = '" $nadir "'");
                
    $dnew1 mysql_fetch_array($dnew);
                
    $pat "$dnew1[text]/$pat";
                
    $nadir $dnew1['refid'];
            }
            
    $l mb_strlen($pat);
            
    $pat1 mb_substr($pat0$l 1);
            echo 
    "[$pat1]</div>";
            ++
    $i;
        }
        echo 
    '<div class="phdr">' $lng['total'] . ': 50</div>';

    echo 
    "<p><a href='index.php?'>" $lng['back'] . "</a></p>";
    require_once (
    '../incfiles/end.php');
    ?>
    Last edited by alin90; 26.03.11, 09:00.

    Comment


      #62
      my reply to JCMS

      i wanna try this, some other time.

      Comment


        #63
        Hi,

        Im new to JCMS, and need some help sorting a few things.

        I have tried and removed the php flag lines from .htacess file and created a new php.ini file with new php flag lines. I cannot seem to install on my server. I was able to install it locally with no problem. when i transfer it to my server i cannot reach http://mysite/install. I have tried all the methods listed here to no avail. Please help someone.

        Comment


          #65
          Is there any chat module available for johncms 4.0.1 ?

          Comment


            #66
            @Jervy qChat is compatible for 4xx! JCMS 401 is only mod and bug fixes! There is no new features nor big coding changes! qchat will work! Get the version from MoBHeLL.TK !

            I have a problem with the Web version! Is working fine on web and also on mobile when using native browsers! On Opera Mini it display the web version!

            Can anyone help me solve this issue?

            Comment


              #67
              Originally posted by alin90 View Post
              Hi , I have a problem, if i have a file that contains " & " in filename when i try to download this file i have an encoding error. xml not well formed . anyone knows how to fix this?
              See my above post

              in php.ini

              arg_separator.output = "&amp;"
              This is ten percent luck, twenty percent skill
              Fifteen percent concentrated power of will
              Five percent pleasure, fifty percent pain

              And a hundred percent reason to remember the name!

              Comment


                #68
                JohnCMS 4.1.0

                The main possibilities of the system:
                - multilingual, the possibility to install / delete the languages of the interface.
                - a high level of safety
                - quick in work, built on MySQL
                - advanced system of differentiation of rights for administrators/moderators
                - forum with the possibility to open / close themes, to create voting, possibility to
                attach files to the theme and etc.
                - private photo albums
                - private guest books
                - advanced library with unlimited nesting of sections and the possibility for the guests to publish their own articles.
                There is a moderation of the articles, that had been published by guests.
                The automatic compilation of Java books.
                - photo gallery
                - download centre with unlimited nesting of sections, counter, rating and comments
                - private mail with the possibility to attach files
                - easy work with smiles
                - change of styles
                - and many other things...

                or you check out for more info on jcms site.
                Attached Files

                Comment


                  #69
                  Hello,

                  I have installed site to server, but when i go to ..download/ & ..gallery/ I get ERROR!
                  Requested pages does not exists. Does anybody know how to fix this. When I was instaling site i manged to fix the errors the site reported on my server by creating php.ini and removing php flag lines from .htaccess. This line (arg_separator.output = "&amp;") was still showing although i placed it in the php.ini file. On my server php.ini there is a line like this one (arg_separator.inpput = "&") maybe I need to include this line to in my johncms php.ini.. If someone knows how to help me, i would appreciate it.

                  Comment


                    #70
                    I have installed jcms on many servers never encountering any problems with the script as it is... Why don't u guys go to official site and go to english forums and ask Varg what the problem is 99.9% your host. Not getting images to display I think u have not set the right permission to the folders
                    My site: http://mimobifunclub.tk
                    sigpic

                    Comment


                      #71
                      Originally posted by mobidev View Post
                      I have installed jcms on many servers never encountering any problems with the script as it is... Why don't u guys go to official site and go to english forums and ask Varg what the problem is 99.9% your host. Not getting images to display I think u have not set the right permission to the folders

                      When installing it showed I need to set file permissions to (XXX) I did that and kept checking again(refresh) and found the error were being fixed.

                      Only arg_separator.output = "&amp;" did not get fixed although I had inserted the code into same php.ini that fixed other issues.

                      If someone can help me it would be greatly appreciated.

                      Comment


                        #72
                        As I said go to johncms.com and ask Varg ort the any of the other who work on johncms if they know the exact problem thee is an english section... Its like if u buy bmw and have engin problems u ask the guy that makes gocarts to fix the problem same applies here want real help ask on the official site
                        My site: http://mimobifunclub.tk
                        sigpic

                        Comment


                          #73
                          on my hosting, where permissions must be set to 777, I must keep it at 755, then everything works. If set to 777 I get errors
                          Why cry for a soul set free?

                          Comment


                            #74
                            Finally fixed errors

                            Thanks guys,

                            I finally fixed the issues. It turned out when I used ftp to upload files some file codes were somehow broken.

                            I got a hold of the error logs and which btw points out clearly where the problem lies. When I compared files sizes I found the issues and solved.

                            The advice I got here was a bit err!. "Change files permissions", that info is in the install instructions.

                            Regarding issue with "Error pages does not exist", I fixed that by creating php.ini with php flag lines listed above but ALSO if you can't access ../download/ or ../gallery/ then you must edit .htacess file in that folder (e.g. ../download/.htacess) and comment out the php flag line by putting # infront of the php line.

                            **Most importantly don't accept advice from strangers telling you to delete something on you server, rather rename it.

                            Thanks for the help!

                            Comment


                              #75
                              Web theme by Venom not working on Opera Mini! Anyone had this issue?

                              Also, how to get bbcode to work on Library items?

                              One last question! How to get only the "Close Site" feature from web theme? Want to keep wap only!
                              Last edited by pakalika; 05.04.11, 23:42.

                              Comment

                              Working...
                              X