JohnCMS 4.0 Official English Release

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

  • alin90
    replied
    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.

    Leave a comment:


  • mobidev
    replied
    By default anywhere files should not contain special characters even on a pc its mostly not allowed as php would nod form it coz & should be &amp; to show as &

    Leave a comment:


  • alin90
    replied
    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?

    Leave a comment:


  • Nepsalone
    replied
    maine folde mean
    Public_html/jcms/ ya
    Home/sitename/public_html
    Where i put this php.ini file

    Leave a comment:


  • alin90
    replied
    Originally posted by andrew3008 View Post
    [iconv] PHP module is not loaded


    im getting this error and i cant find any db.php in incfiles folder plz help me
    I had the same issue, i asked on official forum, and some guy told me that might be from freehosting. pm me with link to your site.

    Leave a comment:


  • andrew3008
    replied
    [iconv] PHP module is not loaded


    im getting this error and i cant find any db.php in incfiles folder plz help me

    Leave a comment:


  • pakalika
    replied
    Did anyone tried the Web version? Any mods available in English for version 4.xx? ! Looks like Official website is offline!

    Im trying to add on the main page Latest Tweets! Tried many twitter scripts but none worked on JCMS. Can anyone help me out!?

    Also, uploading photos (avatar) in PNG format not working! anyone got this issue?
    Last edited by pakalika; 21.03.11, 01:41.

    Leave a comment:


  • just_m3.
    replied
    For those who get errors on install after removing
    lines from .htaccess
    create a file php.ini an paste this in it
    then upload it to your main folder/root

    [PHP]
    magic_quotes_sybase = off
    allow_url_fopen = off
    magic_quotes_runtime = off
    magic_quotes_gpc = off
    session.use_trans_sid = off
    register_globals = off
    error_reporting = 7
    display_errors = off
    arg_separator.output = "&amp;"

    Leave a comment:


  • convictor
    replied
    the add friends site, I will upload it here tomorrow, its easy to install, and I translated friendssite.php to english, it get linked at pages/mainmenu.php

    Leave a comment:


  • convictor
    replied
    I tried it, and don't look bad, and works ok, only problem I can't edit the calendar to english, as soon as I change words to english then it seem the script gets broken

    Leave a comment:


  • pakalika
    replied
    Subzero already helped with this issue! See just above I had the same problem!

    Hey venko, thanks for the indonisean forums. Too bad the mods are for version 3.xx!

    Anyone tried the WEB version from the official JCMS site?

    Leave a comment:


  • hinerie09
    replied
    WARNING:
    arg_separator.output "&" You must use
    arg_separator.output "&amp;", otherwise
    you will not be processed some links

    How to fix it??

    Leave a comment:


  • venko
    replied
    go to indonesian forums e.g jogerwap or wapmod
    there are much of johncms mod in english language.
    i'm sorry i can't share that mod here cz now i'm using dcms.

    Leave a comment:


  • convictor
    replied
    I see there is some Mods on the johncms site but you will have to use the russian forums, with an online translator(I used worldlingo.com, with google I could not manage), some mods I saw is a chatroom, time and date, web version. Unfortunately you will have to translate it from russian

    Leave a comment:


  • subzero
    replied
    Originally posted by pakalika View Post
    On my server got these Warnings.

    Warnings
    register_globals ON You must use
    register_globals OFF, otherwise the system
    will increasingly exposed to vulnerabilities

    arg_separator.output "&" You must use
    arg_separator.output "&amp;", otherwise
    you will not be processed some links

    How do I fix these?
    Last edited by subzero; 15.02.11, 20:29.

    Leave a comment:

Working...
X