Adjusting Semantic Scuttle (Tutorial Part 2)
Saturday, August 09th, 2008 | Author: Andreas
After we installed in the first part Semantic Scuttle we want to make some adjustments to our installation in the second part.
Cleanurls
If you take a look at the links in the top-menu you see for example a link like “http://domain.xxx/populartags.php/” for the popular tags.
This is not looking nice and we are going to change this via cleanurls. After adjusting, the link should look like: “http://domain.xxx/populartags/”. This is realized via a .htaccess-file. But watch out, this is not available for all servers.
- Open the file “config.inc.php” and set $cleanurls to true
$cleanurls = true;
Save the file and test if the cleanurls are working. If everything is doing fine your are done and you can skip the next steps. - If it is not working open the file .htaccess (it is in the root of your installation, if you don’t see the file ensure, that you switched on “show hidden files” in your FTP-program). In Line 29 and 30 you will find:
RewriteRule ^([^/]+)/?(.*) $1.php?query=$2 [L,QSA] #option 1
#RewriteRule ^([^/]+)/?(.*) $1.php/$2 [L] #option 2
Add a # at the start of line 29 and delete it in line 30:
#RewriteRule ^([^/]+)/?(.*) $1.php?query=$2 [L,QSA] #option 1
RewriteRule ^([^/]+)/?(.*) $1.php/$2 [L] #option 2
Save the file and try again if it is now working. - If it is still not working, open the file “constants.inc.php” and commend or delete the lines 21 to 23:
// Correct bug with PATH_INFO (maybe for Apache 1)
// if(strlen($_SERVER["PATH_INFO"])
// $_SERVER["PATH_INFO"] = $_SERVER["ORIG_PATH_INFO"];
//}
Save the file and try again.
If it is still not working, please leave me a comment and I will try to find a solution. Please check first if your web-server supports .htaccess.
Valid XHTML 1.1?
Start your favorite browser and open the W3-Validator put in the address of your Semantic Scuttle installation. The result will be about 28 errors und 19 warnings. This we should fix if we want to be beloved by search-engines.
- If you get the error: “cannot generate system identifier for general entity “PHPSESSID”.”, open the file “index.php” and add in line 21 before:
require_once('header.inc.php');
this line:
ini_set('arg_separator.output','&'); - Open the file /templates/bookmarks.tpl.php and search:
echo '
<img class="thumbnail" src="http://www.artviper.net/screenshots/screener.php?sdx=1024&sdy=768&w=90&h=68&url='.$address.'" alt="" />';
Add in front of src=”http://…. an alt=”":
<img class="thumbnail" alt="thumbnail" src="http:/....
and change the & in
screener.php?sdx=1024&sdy=768&w=90&h=68&url='.$address.'"
at the end there is missing a “/”, add it:
$address.'" />';
After checking with the validator again there should remain only one error:
Line 28, Column 150: document type does not allow element "input" ...
Until now I didn’t figure out how to fix this error but I’m still search a solution. Maybe you know how to solve it?
Other service to generate thumbnails
Because we just edited the right place in the /templates/bookmarks.tpl.php:
echo '<href="'. $address .'"'. $rel .' ><img class="thumbnail" alt="thumbnail" src="
http://www.artviper.net/screenshots/screener.php?sdx=1024&sdy=768&w=90&h=68&url='.$address.'"></a>';
Here is given the code for generating thumbnails. By default this is artviper.net, if you want to use this service you should notice:
- The service is only free for non-commercial sites and you should add a back-link to artviper.net.
- For commercial projects you can buy a licence here.
From time to time the generation of thumbnails with artviper takes a long time, because of this I tried to find an alternative service.
- Websnapr.com
-
Fast and reliable service, no registration needed, premium-service available.
Disadvantage: There is a watermark “by Websnapr.com” on each thumbnail - M-Software.de
- Also for commercial projects free and no registration needed.
Restrictions according content e.g. no pornography.
Disadvantage: Generation of thumbnails needs some time. - Seekxl Snapr.de
-
Free service,
back-link is neededa back-link is not needed. If you are registered (also free) you can set up an custom image if the thumbnail is not generated yet – but than you have to add a back-link to the service. - Mr-Thumb.de
- Free, the generation of thumbnails could be faster.
- www.webseitentuning.de
- Free, unfortunately slowly.
- livethumb.de
- Free, watermark: “preview by liveThumb” if you don’t link back. Relative fast and reliable.
- picoshot.com
- Free and fast but sometimes problems to generate the thumbnail from the given site.
- www.shrinktheweb.com
- Free for 250,000 requests per month, pro-features for some fee. Generell registration needed. Fast and reliable. Anomaly: can not deal with ‘http://’.
Solution:
$n_address = substr($address, 7);
Than call via:
...Url='.$n_address.' - capture.heartrails.com/
- If you are able to speak Japanese, this service is maybe something for you.
All of this thumbnail-services what to have a back-link or require this explicitly. But I think, this is OK. Nothing is really free. Therefore next we will take a look, where to place this link back to the thumbnail-service.
Maybe you know an other thumbnail-service? Please leave a comment, thanks.
Templates
The different areas of Semantic Scuttle are organized by means of different files. The main of these are:
- Head (header): /templates/top.tpl.php
- Here you should add some meta-tags.
- Foot (footer): /templates/bottom.tpl.php
- In the foot you can place the back-link to the thumbnail-service.
- “About”-page: /templates/about.tpl.php
- Here is a good place to add some information e.g. about your person or / and a disclaimer.
About how to change the style of Semantic Scuttle I will maybe write something later on.
Bug: Renaming Tags
In Semantic Scuttle version 0.89 is a little bug, the renaming of tags is not working. The solution is published by Andreas Glaeser.
Open the file “tagrename.php” and add in line 23 after
"require_once('header.inc.php');" following line:
$tagservice = & ServiceFactory :: getServiceInstance('TagService');
Open the file “/services/tagservice.php” starting in line 69 you find the function “renameTag” add a “return true;”, should look like:
function renameTag($uId, $oldName, $newName) {
$query = 'UPDATE `'. $this->getTableName() .'`';
$query.= ' SET tag="'.$newName.'"';
$query.= ' WHERE tag="'.$oldName.'"';
$query.= ' AND uId="'.$uId.'"';
$this->db->sql_query($query);
return true;
}
Now the renaming of tags should work fine.
This was the second part of the tutorials about Semantic Scuttle. I would very appreciate some feedback if this is helpfully for you. The translation (I’m German) takes unfortunately some time and I’m not sure about its quality. If I get the feeling, that my articles will help others than I will go on and write another article about Semantic Scuttle.
Related Posts

Sunday, 24. August 2008
Hallo Andreas, zunächst Glückwunsch zu dem oben angeführten
Tutorial. Deine Tipps sind sehr hilfreich, um Semanticscuttle
wesentlich zu verfeinern. Danke hierfür und weiter so! Eine Frage
hätte ich allerdings noch hinsichtlich der “Cleanurls”: Sobald ich
cleanurls in der config aktiviere (mod_rewrite funktioniert auf
meinem Server) werden sämtliche Urls korrekt umgewandelt – bis auf
eine, nämlich jene des RSS-Feeds. Ein Klick auf das RSS-Gif bei
aktiven Cleanurls führt lediglich zu folgender “Fehlermeldung”:
“The requested URL /ss/rss.gif/ was not found on this server.” Das
“witzige” daran ist, dass die ursprüngliche RSS-Url
(http://domain.com/rss.php/?sort=date_desc) noch funktioniert.
Sämtliche Versuche meinerseits schlugen bis dato leider fehl. Würde
mich freuen, wenn Du eventuell einen Lösungsvorschlag für dieses
Problem hättest. Herzlichen Dank! SG, ehb
Tuesday, 26. August 2008
Thanks a lot ! It was very helpful ! I love scuttle and i hope you
will continue to work on it
Tuesday, 26. August 2008
Hallo ehb,
das Problem mit der rss ist komisch. Die htaccess macht ja nur folgendes: wenn jemand etwas auf dem Server aufruft, dann lade die Datei mit Extension .php schreibe aber in die Adressenleiste den Dateinamen ohne .php. Auch funktioniert dies bei einer neuen Scuttle-Installation ohne Probleme, z.B. auch in meinen Bookmarks, kann es sein, daß du etwas im Quellcode verändert hast? Anhand deiner Angaben kann ich dir leider im Moment nicht helfen. Auf deinem Server hast du die cleanurls auch wieder deaktiviert. Wenn du Lust hast, schreib mir ein Email und wir können gemeinsam auf die Suche nach dem Fehler gehen. Hab aber bitte etwas Geduld, ich hab im Moment leider viel um die Ohren
Hello Korben,
thanks for your feedback. I’m thinking about a “howto style semantic scuttle” in the next part. Would you like this topic? If not, please give me some suggestions what would be interesting for you. But be patient unfortunately I’m very busy at the moment.
Wednesday, 3. September 2008
Schliesse mich da den Ausführungen von ehb an und wollte noch als
Info hier lassen, das Seekxl Snapr.de Free service, back-link is
needed. If you are registered (also free) you can set up an custom
image if the thumbnail is not generated yet. so nicht stimmt. Der
Service ist Back Link frei – also es besteht keine Backlinkpflicht
zur Nutzung. Gruss seekXL
Monday, 8. September 2008
Hallo seekXL, danke für den Hinweis. Wenn ich es richtig verstehe: Der Backlink ist nicht verpflichtend, wenn der Dienst ohne Registrierung genützt wird. Möchte man jedoch sein eigenes Logo haben, muss man sich registrieren und dann auch zurückverlinken. Hab das mal so verbessert, hoffe es passt jetzt.
Sunday, 14. September 2008
Hallo Andreas, ich greife momentan gerne auf deine Anleitung zwecks
Ich habe aber schon seit längerem das normale
Semantic Scuttle zurück. Und danke dir für diese ausführliche
Beschreibung!
Scuttle im Einsatz. Und wills eigentlich nicht mehr missen. Nun hab
ich aber ein Problem mit den clean URLs. Bis jetzt hat alles
einwandfrei funktioniert. Nun habe ich aber einen neuen Webserver.
Und da gehen die clean URLs nicht mehr. Mod Rewrite ist an. Alle
anderen Webseiten die ich umgezogen habe funktionieren auch. Sind
hauptsächlich Joomla Seiten, aber alle mit clean URLs. Nur bei
Scuttle hab ich das Problem, egal wie ich die htaccess umbaue. Es
geht nicht. Wenn ich die htaccess so lasse wie bei dem alten
Webserver (RewriteRule ^([^/]+)/?(.*) $1.php/$2 [L] #option 2) dann
hab ich eine nicht mehr endende Umleitung. Wenn ichs umstelle auf
“RewriteRule ^([^/]+)/?(.*) $1.php?query=$2 [L,QSA] #option 1″ dann
lande ich immer bei den populartags Egal welchen Tag ich anklicke
oder welche Tag Endung eingegeben wird. Ich bin schon die ganze
Zeit am rätseln woran das liegt. PHP läuft nun nicht mehr als
Apache Modul sondern als fcgi. Aber daran könnte es eigentlich
nicht liegen. Kann nur sein das irgendwie mod rewrite anders
arbeitet. Aber da bin ich irgendwie planlos was man da anders
einstellen könnte. Vielleicht weißt du ja nen Rat. PS: Als kleiner
Tip zu deinem validitäts Problem. Probier mal
http://www.validome.org der gibt die Sachen auch auf deutsch aus.
Vielleicht kommst du da dann dahinter was das Problem bei dir ist.
Ich habs bei mir valide bekommen. Kanns aber grad nicht mehr
auswendig sagen was ich alles geändert habe.
Thursday, 18. September 2008
ich habe die validierung bis auf 3 Fehler hin bekommen. Im Ordner
templates die datei top.inc.php folgendes oben ändern
<?php header('Content-Type: text/html; charset=utf-8');“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd” >?>
danach folgt die normale description. ich hoofe es klappt bei
euch…
Tuesday, 28. October 2008
Hallo! Ich hätte eine Frage zu dem Ablaufen von Neueinträgen! Wo
Danke für Eure/Deine Hilfe!
kann ich ändern, dass diese nicht bzw. nicht so schnell ablaufen?
Primär geht es darum, dass ich gewisse Einträge immer vorne, d.h
auf der Startseite haben möchte!
Gruss Marc
Saturday, 1. November 2008
Hallo Andreas, ich habe das gleiche problem wie der Andy es am
14.09.2008 auch schon hatte. Darf ich fragen ob du da schon eine
Lösung hast???? weil irgendwie komme ich hier nicht wirklich
weiter. Über deine Hilfe währe ich dir Dankbar. gruss andi
Monday, 3. November 2008
Hallo Marc,
die Einträge werden standardmäßig nach Datum sortiert. (Man kann auch durch anklicken nach Titel oder URL sortieren lassen). Eine schnelle Möglichkeit wäre das Datum manuell zu verändern. Am einfasten geht das mit phpMyAdmin, in der Tabelle sc_bookmarks den richtigen Eintrag suchen und das Datum (bDatetime) modifizieren.
Hallo Andi,
du hast recht, wir (Andy + ich) haben noch ein paar Sachen ausprobiert.
Andy’s Schlußfolgerung war:
Scuttle mit clean URLs fühlt sich nur unter einer Server Umgebung wohl, wo PHP als reines Apache Modul läuft (mod_php – Apache 2.0 Handler)
Wenn dagegen PHP als CGI bzw. fastCGI läuft gibt’s Probleme mit Scuttle und clean URLs. Daher funktioniert Scuttle mit clean URLs auch nicht unter einem normalen Webspace Paket bei 1und1.
Ich konnte das nicht verifizieren. Trotzdem hilft dir diese Aussage? Kannst du das nachvollziehen?
Viele Grüße, Andreas
Tuesday, 4. November 2008
hallo Andreas, also unser Scuttle läuft mal Nicht auf einem 1&1
Wir hatten auch vorher
Es muss
Webspace, wir haben eigene Rootserver.
ein anderes system laufen das hatte mit Mode_Rewrite keine Problem,
wie auch eine Andere Seite die Du kennst (Mr-Thumb.de)
also irgend etwas mit dem script selber sein, daher auch meine
Frage hier. MfG Andi
Tuesday, 4. November 2008
So viele Andis hier
@Andreas, hab deine letzte Mail schon
Sorry! @Andi, stimmt das sind die gleichen
bekommen. Nur ist mir zwischenzeitlich auch die Zeit ausgegangen da
weiter zu machen
Symptome die auch bei mir aufgetreten sind. Ich hatte zuerst das
ganze unter einem Rooty laufen, wo php direkt als Apache Modul
gelaufen ist. Da funktionierte Scuttle auch einwandfrei. Hab dann
einen neuen Rooty angemietet, den vorher aber schon so eingerichtet
das php nun als fcgi läuft. Hab dann auch eine 1:1 Kopie von dem
funktionierenden Scuttle gemacht und auf den neuen Server
eingespielt. Dann kamen diese komischen Phänomene. Bin dann erst
mal zum Schluss gekommen, das es daran liegt, das php über fcgi
läuft, anstatt als reines Apache Modul. Hab dann den vhost der
Domain auf dem neuen Server auch wieder als Apache Modul laufen
lassen, und siehe da, es funktioniert. Woran das jetzt aber
wirklich liegt, das kann ich nicht sagen. Bin aber vorerst mal froh
das es so läuft. Das mit dem 1und1 Webspace war nur von mir ein
Test. Da ich zusätzlich noch Zugriff auf diesen habe und wollte es
da nur mal testen. Aber geht dort so auch nicht, das dort auch php
über cgi läuft. Vorstellen könnt ich mir jetzt noch irgendwelche
Parameter in der php.ini, die da mit reinspielen. Hab zwar beide
Versionen verglichen und eigentlich keine gravierenden Unterschiede
feststellen können, die auf das Problem hindeuten könnten. Tappe da
also noch im dunkeln. Falls du aber Zeit hast, kannst du ja mal bei
den beiden php Varianten ansetzen und schauen ob du da was
rausbekommst.
Tuesday, 4. November 2008
Sorry Andy (mit Ypslon) wenn ich dir widerspreche.
Das Problem von Andi ist nicht das gleiche. Soweit ich jetzt gesehen habe geht nur der Aufruf der Tags nicht. Bei deiner Installation konnte man das durch den Aufruf: http://domain/tags.php/tag_wort überbrücken und die Einträge zum Tag wurden angezeigt, das geht jedoch bei Andi nicht.
Auch die restlichen Aufrufe gehen ohne Problem.Sorry, sehe gerade der Aufruf:
domain/bookmarks/username/tag geht auch nicht
@Andi, hast du die Zeilen 21 bis 23 in der constants.inc.php gelöscht wie oben beschrieben? Wie schaut deine .htaccess aus? Kannst es mir auch via Email (Kontaktformular im Impressum) schicken.
Update: In der Zwischenzeit hast du ja schon eine Lösung gefunden.
Saturday, 31. January 2009
hi is there any way (using e.g. a custom template) to display more
thumbnails than in the standard version, lets say the whole screen
full of thumbnails to choose from? sometimes i only remember what a
page looked like without more info, that would be really helpful in
such cases… also, could you explain how to use other thumbail
services in more detail? tried 5, nothing works.. greetings..
Tuesday, 10. February 2009
Hallo Andy, Sag giebt es eine Möglichkeit bestimmte Tags (Wörter)
zu Sperren? Meine das die wenn die beim Eintrag drin sind in den
Tags NICHT Veröffentlicht werden? Meine da sowas wie sexx usw.
Wednesday, 1. April 2009
Hey, ich bekomme immer, wenn ich auf einen Link klicke, die
Fehlermeldung “No input file specified.” Kann mir da jemand helfen?