This topic is locked
[SOLVED]

 Change link in short description

11/25/2008 11:59:20 PM
PHPRunner General questions
D
deepdown author

Hi

Can you pls let me know where to change the link in vacproperties_list.php description more template vacances from the popup to the description vacproperties_view.php so that by clicking MORE it will be redirected to the description with th pictures of the article
Thank you

J
Jane 11/26/2008

Hi,
you can edit More links in the ProcessLargeText function in the generated include/commonfunctions.phpfile.

D
deepdown author 11/26/2008

Thank you so much for your help Jane but i can not get it to run <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=35492&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />

If it should be possible can you let me know how to change the link to the special articel in vacproperties_list.php

function ProcessLargeText($strValue,$iquery="",$table="", $mode=MODELIST)

{

global $strTableName;
$cNumberOfChars = GetNumberOfChars($table);

if(substr($strValue,0,8)=="<a href=")

return $strValue;

if(substr($strValue,0,23)=="<img src=\"images/check")

return $strValue;

if($cNumberOfChars>0 && strlen($strValue)>$cNumberOfChars && (strlen($strValue)<200 || !strlen($iquery)) && $mode==MODE_LIST)

{

$ret = substr($strValue,0,$cNumberOfChars );

$ret=htmlspecialchars($ret);

$ret.=" <a href=\"#\" onClick=\"java script: pwin = window.open('',null,'height=300,width=400,status=yes,resizable=yes,toolbar=no,menubar=no,location

=no,left=150,top=200,scrollbars=yes'); ";

$ind = 1;

$ret.="pwin.document.write('" . htmlspecialchars(jsreplace(nl2br(substr($strValue,0, 801)))) ."');";

// $ret.="pwin.document.write('" . db_addslashes(str_replace("\r\n","
",htmlspecialchars(substr($strValue,0, 801)))) ."');";

$ret.="pwin.document.write('
<hr size=1 noshade><a href=# onClick=\\'window.close();return false;\\'>"."Fenster schließen"."</a>');";

$ret.="return false;\">"."Mehr"." ...</a>";

}

else if($cNumberOfChars>0 && strlen($strValue)>$cNumberOfChars && $mode==MODE_LIST)

{

$table = GetTableURL($table);

$ret = substr($strValue,0,$cNumberOfChars );

$ret=htmlspecialchars($ret);

$ret.=" <a href=# onClick=\"java script: pwin = window.open('',null,'height=300,width=400,status=yes,resizable=yes,toolbar=no,menubar=no,location

=no,left=150,top=200,scrollbars=yes');";

$ret.=" pwin.location='".$table."_fulltext.php?".$iquery."'; return false;\">"."Mehr"." ...</a>";

}

else if($cNumberOfChars>0 && strlen($strValue)>$cNumberOfChars && $mode==MODE_PRINT)

{

$ret = substr($strValue,0,$cNumberOfChars );

$ret=htmlspecialchars($ret);

if(strlen($strValue)>$cNumberOfChars)

$ret.=" ...";

}

else

$ret= htmlspecialchars($strValue);

J
Jane 11/27/2008

Here is more easy way to change More link:

  • set up field as custom on the "View as" settings dialog on the Visual Editor tab,
  • add following code:
    global $data;

    $value = substr($value,0,200)." <a href=\"tablename_view.php?editid1=".$data["RecordID"]."\" target=_blank>More...</a>";

D
deepdown author 11/27/2008

Thx a lot Jane

There seems to be something wrong with the code or me <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=35517&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />
By clicking the new link it will be redirected to the correct .php but not to the ID

The redirection looks like this
/vacproperties_view.php?editid1= but should look for example like this

/vacproperties_view.php?editid1=15

global $data;

$value = substr($value,0,200)." <a href=\"vacproperties_view.php?editid1=".$data["RecordID"]."\" target=_blank>Mehr...</a>";
D
deepdown author 11/27/2008

Fixed <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=35518&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />
i get it to work, this code is working

global $data;

$value=substr($value,0,200)."<a href='vacproperties_view.php?editid1=".$data["PropertyID"]."'target=_blank>More...</a>";


Thx a lot for your help Jane