News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Pretty URLs

Started by SMFHacks.com Team, January 31, 2007, 10:56:43 AM

Previous topic - Next topic

Dannii

A bit of context, like what you're doing, would help ;) But you can try vuilian's suggestions too.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

L.G.S

Install.php is still not working for the profile add on.

Error:
Parse error: syntax error, unexpected T_STRING in /home/tscar/public_html/board/instal.php on line 26

Yes I've got it with SSI.php.

FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Dannii

'priority' => 80,That's line 26 for your install.php isn't it? It can't cause a syntax error..
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

cassie

eldʌkaː,

I replaced them with the code you gave and I'm still getting the same error.

If we can't figure out how to fix this, if someone could tell me how to go about gathering all the posts on this board, thru php my admin, and transferring them to a new board, I'll do that. I'll just create a new board and go into the database and transfer all the posts on this board I can't access to a new one.

Dannii

Okay, try deleting both rows and reinstalling the mod.
And can you please give a real link that is broken on your forum for me to see?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Flying Drupalist

Hi, if I install SMF4SEO will I still need to install this mod? Is there any feature missing in SMF4SEO that I will need PrettyURL for?

Dannii

They're incompatible. Choose one or the other.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Kevin Paquet

Quote from: Pasaway on September 12, 2007, 10:17:57 AM
I've got such a strange error.
HACK ATTEMPT...

Help needed still, a detailed explanation for a noob please.

L.G.S

When I try to use my TP shoutbox I get a 404 error after hitting submit, I go back and the message is there, so how can I stop it going to the 404?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Dannii

Pasaway,
Quote from: eldʌkaː on September 12, 2007, 10:41:42 AM
A bit of context, like what you're doing, would help ;) But you can try vuilian's suggestions too.

LGS, what's the URL for the shoutbox that's broken?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

L.G.S

Strange it works now, nevermind.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

viulian

#753
Hi there again.

I am back with a question :)
I am using a module named "Karma Description Mod" in which, when you applaud/smite - you also have to type a reason, and everything is then display in a 'Karma stats' page.
My users are very fond of it, eagerly awaiting for anyone do something and check what, who, when why.

It seems that this module actually tries to parse informations from the submit - and it saves info such as the one below:

5748.msg51900#msg51900

This is used to display the position where the karma point was awarded or taken away.

The issue is that the submit (for karma) is interpreted, parsed, and the topic name is taken from it and put in the karma_log table.
After PrettyURL was installed, this module fails to find the topic id (needed to reconstruct the initial post where karma change happened).

Basically, it correctly takes the textual topic name, and it ends up with entries such as:

un-dulce-crin.msg47896#msg47896

The issue is that it cannot reconstruct the full URL now, as it needs the topic id instead of the prettyfied 'un-dulce-crin'. I manually put the topic id (in the karma_log) instead of un-dulce-crin, and it works - in the Karma Stats window the URL-s look pretty.
(I don't know if in fact it's the karma description mod, or karma engine of SMF).

Do you have any suggestions ? How can I, based on the prettyfied url, get to the topic ID and manually patch the karma mod to take this into account ?

Thanks

Dannii

Grr, this is what happens when people write mods badly :P It should be using $topic and $start rather than looking at the URL. I'll have a look at that mod later when I get home tonight.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

viulian

Yep, you are right. The piece of code is in Sources/Karma.php:

if (isset ($_REQUEST['topic'])) {
                         $link = ($_REQUEST['topic']).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']);


Any quick ideea what to use instead of $_REQUEST['topic'] - I hate debugging remotely - feels like... php again :D

Dannii

Try replacing it with $topic (but make sure $topic is in the list of globals at the beginning of the function too).
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

viulian

Yep, thanks, it was defined and I replaced it with $topic. But not the if part:


if (isset ($_REQUEST['topic'])) {
                         $link = ($topic).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']);


I saw that in fact the if actually checks if the request contains a topic, otherwise it will consider the karma point as coming from PM. So I left the check in place, and just changed the $link variable.

It's working :)

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ourfavwine

Hi Eld^ka,

First let me express my appreciation for this great mod and all the hard work you've put in to it, not only with the original coding but also the support you've given in this thread. I had previously tried to get seo4smf working and after about a week of banging my head against the wall, finally found this mod, which seems far superior.

I have looked through this thread quite a bit and been unable to figure out what is wrong with my site and this mod. I am using the latest, 0.7 version, along with 1.1.3 smf.

When I mouse over the board topic, the link that displays is a "pretty one", but when I click, I get a 404 error. I'm not sure if I'm supposed to have a .htaccess automatically generated in the forum folder? There is not one there. Do I need to write one myself? I do have a .htaccess in a higher directory.

The forums are located at hxxp:ourfavoritewines.com/forum [nonactive]

Thanks again for any help you can provide, and I apologize if I'm missing something obvious or overlooked something in the thread up to this point.
hxxp:ourfavoritewines.com [nonactive]

Advertisement: