![]() |
Sergey Kornilov admin 10/26/2007 |
Don't use Truncate large text fields option. Set View as type of this field to Custom. Write the code that checks the field length and display More link that points to the View page. |
O
|
osluk author 10/26/2007 |
Thanks Sergey I have searched for a similar bit of code and not found any. Don't use Truncate large text fields option. Set View as type of this field to Custom. Write the code that checks the field length and display More link that points to the View page. |
J
|
Jane 10/26/2007 |
Chris, global $data; if (strlen($value)>10) $value = substr($value,0,10)." <a href=\"TableName_view.php?editid1=".$data["IDField"]."\">More...</a>"; |
O
|
osluk author 10/26/2007 |
That is exactly what I wanted. Chris, here is a sample code: |
![]() |
Sergey Kornilov admin 10/26/2007 |
You need to replace IDField with the name of your key column. |
O
|
osluk author 10/26/2007 |
Jane / Sergey |
O
|
osluk author 10/26/2007 |
You need to replace IDField with the name of your key column.
|
J
|
Jane 10/30/2007 |
Chris, global $data; if (strlen($value)>100 && !@$_REQUEST["editid1"]) $value = substr($value,0,100)." <a href=\"Wine_Data_view.php?editid1=".$data["IDField"]."\"><b>More...</b></a>"; |
O
|
osluk author 10/30/2007 |
That is perfect global $data;
Chris, try to use this code: |
O
|
osluk author 10/30/2007 |
global $data;
|
J
|
Jane 10/30/2007 |
Chris, global $data; if (strlen($value)>180 && !@$_REQUEST["editid1"]) $value = substr($value,0,180)." <a href=\"Wine_Data_view.php?editid1=".$data["Ref"]."\"><b>... See Detail Page ...</b></a>"; if (!$value) $value = substr($value,0,180)." <a href=\"Wine_Data_view.php?editid1=".$data["Ref"]."\"><b>... See Detail Page ...</b></a>"; |
O
|
osluk author 10/30/2007 |
Thanks Jane, - a1 support by the way!! {
Chris, to display link to the view page if field is empty use this code: |
J
|
Jane 10/31/2007 |
Chris, global $data; if (strlen($value)>180 && !@$_REQUEST["editid1"]) $value = substr($value,0,180)." <a href=\"Wine_Data_view.php?editid1=".$data["Ref"]."\"><font color=\"#00FF00\"> ..<b>.. See Details Page ..</b>.. </font></a>"; if (strlen($value)<181 && !@$_REQUEST["editid1"]) $value = $value." <a href=\"Wine_Data_view.php?editid1=".$data["Ref"]."\"><font color=\"#00FF00\"> ..<b>.. See Details Page ..</b>.. </font></a>"; if (!$value && !@$_REQUEST["editid1"]) $value = substr($value,0,180)." <a href=\"Wine_Data_view.php?editid1=".$data["Ref"]."\"><font color=\"#00FF00\"> ..<b>.. See Details Page ..</b>.. </font></a>"; |
O
|
osluk author 11/2/2007 |
Perfect,
global $data;
|