Author Topic: Comment Counter  (Read 25594 times)

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Comment Counter
« Reply #15 on: August 18, 2005, 11:43:13 AM »
hallo Vincent,

deine Navigationsliste ist eine html-Datei ... aber mit php-Extension ...  :? ... sicher um sie "includen" zu können ...
dann versuche den Kommentrar-Counter in der Navigationsliste mal so zu integrieren ...
Code: [Select]
...
<a style="text-decoration: none" href="soldpubl.php">&gt; Verkaufte Fotos <? print $total_comments ?></a>
...

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

TheOracle

  • Guest
Re: Comment Counter
« Reply #16 on: August 18, 2005, 12:07:49 PM »
Quote

<a style="text-decoration: none" href="soldpubl.php">&gt; Verkaufte Fotos <? print $total_comments ?></a>


This method would not be advisable since your URL is not being used under sessions.

Althought, what you could do is this (if you intend to use it under PHP) :

Code: [Select]

<a style=\"yourCSSfile(rather than the code directly here)\" href=\"".$site_sess->url(ROOT_PATH."soldpubl.php")."\">&gt; Verkaufte Fotos ".$total_comments."</a>


;)

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Comment Counter
« Reply #17 on: August 18, 2005, 05:33:51 PM »
@ TheOracle,
... mmm ... your solution don't work in html-files renamed as php-files ... like in templates by vierstra ...  :?

@ Vincent,
folgendes habe ich für deine verzwickte Situation (Template by vierstra.com) getestet ...

1. den Kommentar-Counter hast du wie bereits beschrieben in der page_header.php eingebaut

2. in allen Template-Seiten in denen du diesen Counter in deiner Navigationsleiste zeigen willst , also home.html, usw. ... , fügst du unmittelbar unter {header} folgendes ein :
Code: [Select]
<?php
 $tc 
"{total_comments}";
?>


3. nun kannst du in deiner menue.php (bzw. wie deine Navigationsliste heist) folgendes für die Anzahl der Kommentare (bei dir, die der verkauften Bilder) verwenden ( <? print $tc ?> ). Dein Link im Menü würde dann so aussehen :
Code: [Select]
<a style="text-decoration: none" href="soldpubl.php">&gt; Verkaufte Fotos <? print $tc ?></a>
soweit funktioniert es zunächst nach dem Prinzip von vierstra !

4. Die Verwendung deiner Links in der Navigationliste unter "sessionsid" (wie von TheOracle angeregt) solltest du dann anschließend noch prüfen ! Wobei ich den Link mit sess-id in der page_header.php registrieren würde.
Code: [Select]
"url_soldpubl" => $site_sess->url(ROOT_PATH."soldpubl.php"),
so dass du als URL für den Link in der menue.php (bzw. wie deine Navigationsliste heist) folgendes verwenden kannst : {soldpubl}

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: Comment Counter
« Reply #18 on: August 18, 2005, 07:46:48 PM »
@Mawenzi
VIELEN DANK  für die Hilfe - es geht - hab es aber doch ein bisschen anders gemacht!

statt es (<?php $tc = "{total_comments}"; ?>) in jeder HTML Datei unter {header} einzufügen habe ich es in der header.html datei am schluss eingefügt!

Danach musste ich nur noch <? print $tc ?> nach dem verkaufte Fotos text eingeben! und es funzt so wie ich es mir wünschte !

nochmals vielen Dank!  :wink:

vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Comment Counter
« Reply #19 on: August 18, 2005, 09:41:48 PM »
... habe ich es in der header.html datei am schluss eingefügt!

... hast natürlich Recht ... hatte es nur auf einer Seite getestet und von daher mein voreiliger Schluss ...  :lol:
freut mich, dass es nun endlich geklappt hat ...

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

TheOracle

  • Guest
Re: Comment Counter
« Reply #20 on: August 20, 2005, 02:24:15 PM »
Quote

@ TheOracle,
... mmm ... your solution don't work in html-files renamed as php-files ... like in templates by vierstra ...  Confused


My solution was never about renaming HTML files as PHP files but parsing PHP initials into HTML files.  :?