Jump to content

astarmathsandphysics

Members
  • Posts

    19
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by astarmathsandphysics

  1. I have a directory lising script at astarmathsandphysics.com, listing maths notes

    Ithe script I am using displays images that I would like to exclude from the list

    How do I do this?

    This is the listing code I am using

     

    if($this->files)
    {
        $count = 0;
        foreach ($this->files as $file)
        {
            $row_style = ($row ? "one" : "two");
            print "<tr class=\"row ".$row_style.(++$count == count($this->files)?" last":"")."\">\n";
            print "<td class=\"name\">\n";
            print "\t\t<a href=\"".$this->location->getDir(false, true, false, 0).$file->getNameEncoded()."\"";
            if(EncodeExplorer::getConfig('open_in_new_window') == true)
                print "target=\"_blank\"";
            print " class=\"item file";
            if($file->isValidForThumb())
                print " thumb";
            print "\">";
            print $file->getNameHtml();
            if($this->mobile == true)
            {
                print "<span class =\"size\">".$this->formatSize($file->getSize())."</span>";
            }
            print "</a>\n";
            print "</td>\n";
            if($this->mobile != true)
            {
                print "<td class=\"size\">".$this->formatSize($file->getSize())."</td>\n";
                print "<td class=\"changed\">".$this->formatModTime($file->getModTime())."</td>\n";
            }
            if($this->mobile == false && GateKeeper::isDeleteAllowed()){
                print "<td class=\"del\">
                    <a data-name=\"".htmlentities($file->getName())."\" href=\"".$this->makeLink(false, false, null, null, $this->location->getDir(false, true, false, 0).$file->getNameEncoded(), $this->location->getDir(false, true, false, 0))."\">
                        <img src=\"?img=del\" alt=\"Delete\" />
                    </a>
                </td>";
            }
            print "</tr>\n";
            $row =! $row;
        }
    }
     

  2. The code below wis taken from my joomla website. It is a social booking plugin. I want to edit this code and put it in ohtml pages on the same website so that it will bookmark whichever page it is pasted it. How do I edit the url's cos at the moment only the home page will be bookmarked?

    <div id="area-3" class="tabouter"><ul class="tabs"><li class="tab"><a href="#" id="link_96" class="linkopen" onclick="tabshow('module_96');return false"></a></li></ul><div tabindex="-1" class="tabcontent tabopen" id="module_96"><div class="nsb_container" align="center"><a id="l1" target="_blank" rel="nofollow" href="http://www.facebook.com/sharer.php?u=http://www.astarmathsandphysics.com/&title=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London"><img title="Facebook" border="0" src="modules/mod_nice_social_bookmark/icons/facebook_aqu_24.png" alt="Facebook"/></a><a id="l2" target="_blank" rel="nofollow" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&u=http://www.astarmathsandphysics.com/&title=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London"><img title="MySpace" border="0" src="modules/mod_nice_social_bookmark/icons/myspace_aqu_24.png" alt="MySpace"/></a><a id="l3" target="_blank" rel="nofollow" href="http://twitter.com/home?status=http://www.astarmathsandphysics.com/&title=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London"><img title="Twitter" border="0" src="modules/mod_nice_social_bookmark/icons/twitter_aqu_24.png" alt="Twitter"/></a><a id="l4" target="_blank" rel="nofollow" href="http://digg.com/submit?phase=2&url=http://www.astarmathsandphysics.com/&title=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London"><img title="Digg" border="0" src="modules/mod_nice_social_bookmark/icons/digg_aqu_24.png" alt="Digg"/></a><a id="l5" target="_blank" rel="nofollow" href="http://del.icio.us/post?url=http://www.astarmathsandphysics.com/&title=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London"><img title="Delicious" border="0" src="modules/mod_nice_social_bookmark/icons/delicious_aqu_24.png" alt="Delicious"/></a><a id="l6" target="_blank" rel="nofollow" href="http://www.stumbleupon.com/submit?url=http://www.astarmathsandphysics.com/&title=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London"><img title="Stumbleupon" border="0" src="modules/mod_nice_social_bookmark/icons/stumbleupon_aqu_24.png" alt="Stumbleupon"/></a><a id="l7" target="_blank" rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&bkmk=http://www.astarmathsandphysics.com/&title="><img title="Google Bookmarks" border="0" src="modules/mod_nice_social_bookmark/icons/google_aqu_24.png" alt="Google Bookmarks"/></a><a id="l8" target="_blank" rel="nofollow" href="http://reddit.com/submit?url=http://www.astarmathsandphysics.com/&title=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London"><img title="reddit" border="0" src="modules/mod_nice_social_bookmark/icons/reddit_aqu_24.png" alt="Reddit"/></a><a id="l9" target="_blank" rel="nofollow" href="http://www.newsvine.com/_tools/seed&save?u=http://www.astarmathsandphysics.com/&h="><img title="newsvine" border="0" src="modules/mod_nice_social_bookmark/icons/newsvine_aqu_24.png" alt="Newsvine"/></a><a id="l10" target="_blank" rel="nofollow" href="http://technorati.com/faves?add=http://www.astarmathsandphysics.com/&title=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London"><img title="technorati" border="0" src="modules/mod_nice_social_bookmark/icons/technorati_aqu_24.png" alt="Technorati"/></a><a id="l11" target="_blank" rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&url=http://www.astarmathsandphysics.com/&summary=%5B..%5D&source="><img title="linkedin" border="0" src="modules/mod_nice_social_bookmark/icons/linkedin_aqu_24.png" alt="Linkedin"/></a><a id="l12" target="_blank" rel="nofollow" href="http://www.mixx.com/submit?page_url=http://www.astarmathsandphysics.com/&title=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London"><img title="Mixx" border="0" src="modules/mod_nice_social_bookmark/icons/mixx_aqu_24.png" alt="Mixx"/></a>
    <div id="plusone"></div>
    <script type="text/javascript" src="https://apis.google.com/js/plusone.js">

    {"lang": "en-US", "parsetags": "explicit"}

    </script>
    <script type="text/javascript">

    gapi.plusone.render("plusone",

       {"size": "standard", "count": "true", "href":"" });

    </script>
    <a href="http://pinterest.com/pin/create/button/?url=http://www.astarmathsandphysics.com/&media=&description=Private KS1/KS2/KS3/GCSE/IGCSE/IB/O & A Level/University Physics/Maths tuition in London" class="pin-it-button" count-layout="none"><img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It"/></a>
    <script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>
    </div><div style="clear:both;"></div></div></div>
    </div>

  3. I run smf 1.1.6 anfd I think I  am being penalized in the search engines because alll my tiyle tags are the same> I have tried to edit them to include the topic and pagenumber using a mod from the smf modsite but with no success. Any ideas?

  4. How do I edit this file to make directories list in alphabetical order?

    <?php
    
    /*The following are for styling only*/
    
    echo "<html><head><link rel=stylesheet href=links.css /><title>Free Exam Papers</title></head>";
    
    echo "<body>";
    
    include("upper.title");
    
    echo "<br>";
    
    include ("DirUpper.ads");
    
    /*The styling finishes up*/
    
    
    
    ############ FUNCTIONS #############
    
    
    
    function cScanDir($dir){
    
    if($handle = opendir($dir)){
    
               while(false !==($file=readdir($handle))){
    
                    if($file !="."&&$file !="..")
    
                    $file_temp['name']=$file;
    
                    $file=$dir.'/'.$file;
    
                    $file_temp['type']=(is_dir($file) ? 'Folder' : fileType($file));
    
                    $file_temp['time']=date("d/m/Y - G:i:s", filectime($file));
    
                    $file_temp['size']=round((filesize($file)/(filesize($file)>1048576 ? 1048576 : (filesize($file)> 1024 ? 1024 : 1))),2).''.(filesize($file)>1048576 ? 'mb':(filesize($file)>1024 ? 'kb': (filesize($file)== 0 ? "" :'b')));   //i did some change some things as i thought they were  bugs.
    
                    $files[]=$file_temp;
    
                    unset($file_temp);
    
                   }
    
                   closedir($handle);
    
           }
    
           return $files;  //###########I CHANGED THIS VARIABLE###########//
    
    }
    
    function CheckDirectroyFiles(){
    
    $defDir='IGCSE';
    
    if($_GET["d"]!=""){
    
       $dir=$_GET["d"];
    
       $dir=base64_decode($dir);
    
       }
    
    else {
    
       $dir=$defDir;
    
       }
    
    $files=cScanDir($dir);
    
    $numfiles=count($files);
    
    //showing files start here
    
    echo "<hr>";
    
    /*          						   No pagination shit!
    
    if($dir != $defdir){
    
            $dir_list=explode('/',$dir);
    
            foreach($dir_list as $dir_temp){
    
                              $dir_run.=($dir_run ? '/':"").$dir_temp;
    
                              $paginate[]='<a href='.$SERVER['PHP_SELF'].'?d='.$dir_run.'>'.$dir_temp.'</a>';
    
    
    
            }
    
            unset($dir_temp,$dir_list,$dir_run);
    
            echo 'Parent directory:'.implode('/',$paginat);
    
    }*/
    
    echo "<hr><table>";
    
    echo "<tr><td width=400><u>File</u></td><td width=80><u>Size</u></td><td width=150><u>Last Modified</u></td><td width=100><u>File Type</u></td></tr>";
    
    echo "</table><hr color=#AE4600><table>";
    
    
    
    $thePHPFilename=$_SERVER["PHP_self"];
    
    $currentDir="a/"; // change this directory when put in server you can change this var, might not even need it!
    
    for($a=0;$a<$numfiles;$a++){
    
    if($files[$a]['type']=='Folder'){
    
                /* $href=$_SERVER['PHP_SELF'].'?d='.$files[$a];//i have changed this bit to make it more sensible*/
    
                $foldernamin=$files[$a]['name'];
    
                $stuffers=$dir.'/'.$foldernamin;
    
                $URLEncodinDirectory=base64_encode("$stuffers");
    
                $scriptFileToUse=$thePHPFilename.'?d='.$URLEncodinDirectory;
    
    }
    
    else{
    
                $filenamin=$files[$a]['name'];
    
                $stuffs=$dir.'/'.$filenamin;
    
                $URLEncodinFiles=base64_encode("$stuffs");
    
                $scriptFileToUse='Download.php?f='.$URLEncodinFiles;
    
                 /*$href='download.php?f='$dir.$files[$a]['name']; */
    
    }
    
    echo '<tr><td width=400><a href='.$scriptFileToUse.'>'.$files[$a]['name'].'</a></td><td width=80>'.$files[$a]['size'].'</td><td width=150>'.$files[$a]['time'].'</td><td width=100>'.$files[$a]['type'].'<td></tr>';
    
    }
    
    echo "</table>";
    
    echo "<hr>";
    
    }
    
    //directory problem solved here!
    
    ##########END FUNCTIONS################
    
    echo "<table width=100%><tr><td width=130px>";
    
    include("leftH.ads");
    
    echo "</td><td>";
    
    CheckDirectroyFiles();
    
    echo "</td><td width=130px>";
    
    include("rightH.ads");
    
    echo "</td></tr></table>";
    
    echo "<br>";
    
    include ("DirLower.ads");
    
    echo "<hr>";
    
    include("bottom.footer");
    
    echo "</body>";
    
    echo "</html>"
    
    ?>

    EDITED BY WILDTEEN88: Please use code tags (

    
    

    ) when posting code

    [/code]

  5. I installed clip bucket but When I go to the admin panel for the first time I get this

     

     

     

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/.rastus/astarmathsandphysics/public_html/includes/classes/mysql_queries.class.php on line 29

     

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/.rastus/astarmathsandphysics/public_html/includes/classes/user.class.php on line 93

     

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/.rastus/astarmathsandphysics/public_html/includes/classes/user.class.php on line 97

     

    What can I do?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.