Trying to change some link URLs..

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
nickn
Posts: 23
Joined: Mon Mar 15, 2004 5:58 pm

Trying to change some link URLs..

Post by nickn »

Hi!

Firstly, thanks for the awesome software...I love it...I've been modifying it to be search engine friendly, I've rewrote all the URLs so far (www.cPanelFAQ.org if you're interested) however there's one part I can't seem to find.

On the article pages, where is the functions/code that defines where those links go? I've looked everywhere I would commonly think to look, and can't find them

Please help :)
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which links do you mean?

Do you use mod_rewrite?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nickn
Posts: 23
Joined: Mon Mar 15, 2004 5:58 pm

Post by nickn »

Hi Thorsten,

Again, thanks for the great script.

Yes, I'm using mod rewrite, I could provide the rules if it would help others. It's much better for making the FAQ friendly to SEOs. I still had to change all the URLs in the code though, but it wasn't very big change (since the variables were already there)

Anyhow, if you go to any of my articles...
http://www.cpanelfaq.org/006/42.html

The "Printer Friendly" , "PDF", "XML" and "Send to a friend" links do not work. This wouldn't be a problem to fix, but I can't find the functions for these anywhere.

Also the "Content Overview" and "Comment" functions aren't working either.

Basically all 6 URLs on each of the links do not work.

I'll grab the mod_rewrite rules I'm using as an example for everyone, it would be a great option :)
nickn
Posts: 23
Joined: Mon Mar 15, 2004 5:58 pm

Post by nickn »

These are the rules I'm using right now, definitely not the most efficient way of doing it, but without recoding a lot, it works well..i'm not really worried about CPU usage...and that's the only downside

RewriteEngine On
RewriteLog "/home/cpfaq/public_html/rewrite.log"
RewriteLogLevel 2
Options +FollowSymLinks
RewriteRule ^/([0-9]+)/([0-9]+)\.html
/index.php?aktion=artikel&rubrik=$1&id=$2&lang=en [L]
RewriteRule ^/[Ss][Ii][Tt][Ee][Mm][Aa][Pp]([0-9]+)\.html$
/index.php?aktion=sitemap$1 [L]
RewriteRule ^/[Ss][Ii][Tt][Ee][Mm][Aa][Pp]\.html$ /index.php?aktion=sitemap
[L]
RewriteRule ^/([0-3][0-3][0-9])/[Ii][Nn][Dd][Ee][Xx]\.html
http://www.cpanelfaq.org/index.php?akti ... &rubrik=$1 [L]
ReWriteRule ^/[Ss][Hh][Oo][Ww][Cc][Aa][Tt]\.html$ /index.php?aktion=anzeigen
[L]
ReWriteRule ^/[Ss][Ee][Aa][Rr][Cc][Hh]\.html$ /index.php?aktion=search [L]
ReWriteRule ^/[Aa][Dd][Dd][Cc][Oo][Nn][Tt][Ee][Nn][Tt]\.html$
/index.php?aktion=add [L]
ReWriteRule ^/[Aa][Ss][Kk]\.html$ /index.php?aktion=ask [L]
ReWriteRule ^/[Oo][Pp][Ee][Nn]\.html$ /index.php?aktion=open [L]
ReWriteRule ^/[Hh][Ee][Ll][Pp]\.html$ /index.php?aktion=hilfe [L]
ReWriteRule ^/[Cc][Oo][Nn][Tt][Aa][Cc][Tt]\.html$ /index.php?aktion=kontakt
[L]
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

we should set the mod_rewrite rules step by step.

For printing:

The script wants the following:

printing.php?id=<record id>&lang=<language>

more in the next days, I'm very busy... :(

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nickn
Posts: 23
Joined: Mon Mar 15, 2004 5:58 pm

Post by nickn »

I'll work on a little howto on doing the rewrites :)
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

nickn wrote:I'll work on a little howto on doing the rewrites :)
that would be great, I'll think of an integration of mod_rewrite into phpMyFAQ itself.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nickn
Posts: 23
Joined: Mon Mar 15, 2004 5:58 pm

Post by nickn »

I can't seem to use mod_rewrite to change those links correctly...where can I change them in the code? which file are they in?
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

these links are in artikel.php.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nickn
Posts: 23
Joined: Mon Mar 15, 2004 5:58 pm

Post by nickn »

Maybe I"m not seeing it, I see the functions in artikel.php to create the links (i'm looking for the code that creates the actual HTML link to the comments page, etc)
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

sorry for misunderstanding.

The comments are written in the file writecomment.php, the PDFs are generated in pdf.php, the XML file in xml.php and the Send2Friend function is located in the file send2friend.php

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nickn
Posts: 23
Joined: Mon Mar 15, 2004 5:58 pm

Post by nickn »

Thanks Thorsten,

Again, great software I love it :)

One more question/feature request..

Can we have a way to see all new comments? or all comments total? Maybe just a link in the admin panel to click to see comments placed with a link to where they were placed, so we can delete any that need (i've already found people are using them to spam, and they don't seem t obe easy to find..) I know I had 2 new comments last night but haven't found them yet :)
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Nick,

you can see where the comments are then you're browsing through the article list in the admin section.

A complete list isn't availible in 1.3.x, maybe in 1.4

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
cyanide
Posts: 2
Joined: Thu Aug 21, 2003 9:13 pm

Post by cyanide »

Hey nick...

Great script for the re-write...

I fired it into htaccess and uploaded it, but I'm getting an Internal Server Error... Did you encounter this?
Any ideas ?
Post Reply