Support Spidean

Do you like our FREE downloads? How about the FREE support for the FREE downloads? Please help us out and donate any amount! It's fast and easy through PayPal.

Spidean Forums

Board Index > Support (1.77) > backend.php and short urls


 < Last Thread   Next Thread >New Topic  Post Reply
Author: Subject: backend.php and short urls

Senior Member





Posts: 149
Registered: 1/31/2004
Status: Offline

  posted on 6/15/2007 at 11:10 AM
Hi Shawn!

I need another code snipet of you to get the backend.php to show the autourlV4.


Here is the code from the backend.php:

// get the short urls extensions
$urlsok = pnModGetVar('Xanthia', 'shorturlsok');
$urlextension = pnModGetVar('Xanthia', 'shorturlsextension');
$baseurl = pnGetBaseURL();

 

____________________
Carl

MazDev.com
Fishing & Boat trips at the isle Langkawi - Malaysia

 
Reply With Quote Visit User's Homepage

Administrator




Posts: 4575
Registered: 10/7/2002
Status: Online

  posted on 6/15/2007 at 11:20 AM
I need the part that actually runs the shorturls. AutoURLs extra already figures out the extensions and stuff for you.

-Shawn

 
Reply With Quote

Senior Member




Posts: 149
Registered: 1/31/2004
Status: Offline

  posted on 6/15/2007 at 01:09 PM
I guess this is the part you need.

quote:
// form the url
if($urlsok == 1) {
$link = pnVarPrepForDisplay("{$baseurl}Article$sid.$urlextension");
} else {
$link = pnVarPrepForDisplay("{$baseurl}index.php?name=News&file=article&sid =$sid");
}

$content = pnVarPrepForDisplay(strip_tags($hometext));


I know that the AutoURLs extension figures out the extensions. The problem here is only that PN points everything towards Xanthia.

 

____________________
Carl



MazDev.com

Fishing & Boat trips at the isle Langkawi - Malaysia


 
Reply With Quote

Administrator




Posts: 4575
Registered: 10/7/2002
Status: Online

  posted on 6/15/2007 at 01:42 PM
OK, I see. So for this and your last post you need to see if AutoURLs are enabled and also the extension to build a link. Sorry wasn't paying attention.

$autoextra = atAutoGetVar('autoextra');

if ($autoextra['autourlsV4'] == 1) {
$autourls = atAutoGetVar('autourlsV4');
$urlextension = $autourls['extension'];

$link = pnVarPrepForDisplay("{$baseurl}Article$sid.$urlextension");
} else {
$link = pnVarPrepForDisplay("{$baseurl}index.php?name=News&file=article&sid =$sid");
}

-Shawn

[Edited on 6/15/2007 by Shawn]

 
Reply With Quote

Senior Member




Posts: 149
Registered: 1/31/2004
Status: Offline

  posted on 6/15/2007 at 02:19 PM
Worked perfect.

Only for the others to keep it easy:

by backend.php =

// get the short urls extensions about line 58
$urlsok = pnModGetVar('Xanthia', 'shorturlsok');
$urlextension = pnModGetVar('Xanthia', 'shorturlsextension');
$baseurl = pnGetBaseURL();

change this to:

// get the short urls extensions
$autoextra = atAutoGetVar('autoextra');
$autourls = atAutoGetVar('autourlsV4');
$urlextension = $autourls['extension'];
$baseurl = pnGetBaseURL();


and about line 126

// form the url
if($urlsok == 1) {
$link = pnVarPrepForDisplay("{$baseurl}Article$sid.$urlextension");
} else {
$link = pnVarPrepForDisplay("{$baseurl}index.php?name=News&file=article&sid =$sid");
}


change it to:

if ($autoextra['autourlsV4'] == 1) {
$link = pnVarPrepForDisplay("{$baseurl}Article$sid.$urlextension");
} else {
$link = pnVarPrepForDisplay("{$baseurl}index.php?name=News&file=article&sid =$sid");
}

 

____________________
Carl





MazDev.com


Fishing & Boat trips at the isle Langkawi - Malaysia



 
Reply With Quote
New Topic    Post Reply


Main Menu

Get AutoTheme

Featured Item

Poll

How do you like the new look?

[ Results | Polls ]

Votes: 103
Comments: 0

Powered by the AutoTheme HTML Theme System
Page created in 0.122142 Seconds