Jump to content

astarmathsandphysics

Members
  • Posts

    19
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by astarmathsandphysics

  1. Whey that works. Well on the way now to saying bye to html
  2. here is the title code $_CONFIG['main_title'] = "A Star Maths and Physics Notes"; <title><?php if(EncodeExplorer::getConfig('main_title') != null) print EncodeExplorer::getConfig('main_title'); ?></title>
  3. I can't make it work. Not an expert even good programmer.
  4. I have several websites using the same basic script and I have the same problem in each - all the page titles are the same. see http://courseworkbank.info/?dir=GCSE the page title here is COURSEWORKBANK.INFO I would like it to be GCSE For http://courseworkbank.info/?dir=GCSE/Biology I would like it to be GCSE - Biology How do I do this? Am using a simple index.php file to load everything.
  5. As for getting files I want all the html files listed. Iwas inserting the links in a menu file manually, but when I have hundreds to do its a real drag.
  6. yes I added it. It works perfectly. I have written 6000 or so pages of maths and physics notes at the rate of 2 a day. Try to make maintenance easier.
  7. Whey they that works. Only 500 or so more problems to solve converting my site to php
  8. Doesnt work so far Here is an example page. http://astarmathsandphysics.com/notes/?dir=gcse-physics
  9. 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; } }
  10. I have a free coursework website with 20000 courseworks sorted into folders IThe ame page title appears on each page except when a doc/pdf file displays in the browser. I would like to set the page title as the path. I am using a single index.php file to load every page so I only need a single piece of code I think. How do I do this in php?
  11. 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>
  12. 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?
  13. I am totally new to php, and dont uderstand anything about arrays. I really want an example to study.
  14. 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]
  15. 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.