Not for official support
We do not provide technical support in this forum.
If you want to contact our customer support, please use our support form.

You are not logged in.

#1 2011-04-07 09:27

rat
Administrator

How to enable "Change Address" for Link widgets in Files and Photos

The "Change Address" function in WebAsyst applications Files and Photos (for Link widgets) is by default available only for users of the WebAsyst online services. To enable this function in the open-source version of both applications, follow the instructions provided below.

1. Ensure that WebAsyst scripts have been installed on a server with web server software Apache and web server module mod_rewrite!

2. Edit file .htaccess in the WebAsyst installation directory:
add the following line at the beginning of the file (only if it is missing!):

Code:

RewriteEngine On

after that line add the following code:

Code:

RewriteRule ^files/(.*)/(.*) published/WG/show.php?q=-$1&fparams=$2 [L]
RewriteRule ^files/(.*) published/WG/show.php?q=-$1 [L]
RewriteCond  %{REQUEST_FILENAME} !-f
RewriteRule ^DD/(.*) published/DD/$1 [L]

RewriteRule ^photos/(.*)/(.*) published/WG/show.php?q=-$1&fparams=$2 [L]
RewriteRule ^photos/(.*) published/WG/show.php?q=-$1 [L]
RewriteCond  %{REQUEST_FILENAME} !-f
RewriteRule ^PD/(.*) published/PD/$1 [L]

3. In file published/WG/html/scripts/_WidgetsPageBuilder.php change line

Code:

$this->preproc->assign ("canChangeUrl", onWebasystServer());

to

Code:

$this->preproc->assign ("canChangeUrl", true);

4. In file published/WG/includes/widget_type.php apply the following changes:
a. change line

Code:

$src = $pageProtocol . $host . $subEmbInfo["short_link"] . "/" . $widgetData["WG_FPRINT"];

to

Code:

$src = getLinkPrefix(4) . $subEmbInfo["short_link"] . "/" . $widgetData["WG_FPRINT"];

b. change line

Code:

if ($subEmbInfo["short_link"] && onWebasystServer()) {

to

Code:

if ($subEmbInfo["short_link"]) {

c. change line

Code:

if ($subEmbInfo["short_link"] && onWebasystServer()) {

to

Code:

if ($subEmbInfo["short_link"]) {

5. In file published/WG/widgets/DDList/SubtypeLink.php change line

Code:

if (onWebasystServer() && $this->shortLink) {

to

Code:

if ($this->shortLink) {

6. In file published/WG/widgets/DDList/Subtype.php change line

Code:

if (onWebasystServer() && $this->shortLink) {

to

Code:

if ($this->shortLink) {

Be careful what you wish for — you might get it.

Offline

 

Board footer

Powered by PunBB