Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Visually Shortening

Received: by 10.59.6.72 with SMTP id cs8mr12581397ved.27.1351618851779;
        Tue, 30 Oct 2012 10:40:51 -0700 (PDT)
X-BeenThere: subjectsplus@googlegroups.com
Received: by 10.220.226.7 with SMTP id iu7ls105500vcb.6.gmail; Tue, 30 Oct
 2012 10:40:51 -0700 (PDT)
Received: by 10.52.37.12 with SMTP id u12mr6273063vdj.8.1351618851353;
        Tue, 30 Oct 2012 10:40:51 -0700 (PDT)
Date: Tue, 30 Oct 2012 10:40:50 -0700 (PDT)
From: "gs@stcloudstate" <gor...@stcloudstate.edu>
To: subjectsplus@googlegroups.com
Message-Id: <ab685740-7497-4165-8457-c890335eb973@googlegroups.com>
In-Reply-To: <b1c65505-68b1-4933-a6cb-2bd42f4f9bf6@googlegroups.com>
References: <b1c65505-68b1-4933-a6cb-2bd42f4f9bf6@googlegroups.com>
Subject: Re: Visually Shortening
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_297_16721085.1351618850977"

------=_Part_297_16721085.1351618850977
Content-Type: multipart/alternative; 
	boundary="----=_Part_298_12911927.1351618850978"

------=_Part_298_12911927.1351618850978
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

We wanted the same thing where the "All Items by Source" was compressed by 
type and each type can be individually display by clicking. We used the 
expand icon to
indicate there is something to view. Below are the changes we made to 
implemented it.

Gordie

 

> Added show/hide,(display hidden/visible) feature to pluslet "All Items by 
> Source"
> 1. Add css and small script to <head> area of  the header file, in this 
> case I added to our custom-header.phtml that is called by the header.php 
> file
>
> [css stuff]
> .nolooky {
>      display : none;
>      }
>
> [script]
> <script><script>
> function showhide(id){
>      jQuery('#'+id).toggle('slow');
>      
> }
> </script>
>
>
> 2. Modify /sp/control/includes/classes/sp_Pluslet_1.php, in function 
> output,
> We really don't need the TOC, so we decided to disable it
> from:
>        /////////////////////////
>         // Create TOC
>         /////////////////////////
>
>         $TOC = self::createTOC();
>
>        $this->_body = $TOC;
>
> to (comment out the TOC stuff):
>        /////////////////////////
>         // Create TOC
>         /////////////////////////
>
>         //$TOC = self::createTOC();
>
>         //$this->_body = $TOC;
> --------------------
> from:
>             if ($this_source_id != $last_source_id) {
>
>                 $results .= "<p  class=\"leftcolheader\"><a 
> name=\"$myrow[4]\"></a>$myrow[3]</p>\n\n";
>                 $last_source_id = $this_source_id;
>                 $res_class = "dbresults no-border";
>             } else {
>                 $res_class = "dbresults";
>             }
>
> to:
>           if ($this_source_id != $last_source_id) {
>              $results .= "$enddiv"; #first time through $enddiv is blank 
> which is what we want
>
>              $nolooky_id += 1;  
>              $nolooky_id_name = sprintf("nolooky_id_%d",$nolooky_id);  # 
> create unique id names for each information type
>
>                 $results .= "<p onclick=\"showhide('{$nolooky_id_name}')\" 
> class=\"leftcolheader\"><img src=\"/sp/assets/images/icons/expand.png\" 
> />&nbsp;&nbsp;<a name=\"$myrow[4]\"></a>$myrow[3]</p>\n\n<hr><div 
> id=\"{$nolooky_id_name}\"class=\"nolooky\">";
>                 $last_source_id = $this_source_id;
>                 $enddiv = "</div>";
>                 $res_class = "dbresults no-border";
>             } else {
>                 $res_class = "dbresults";
>             }
> ---------------------
> And a little lower down, from:
>         }
>
>         $this->_body .= $results;
>
>         parent::assemblePluslet();
>
>         return $this->_pluslet;
>
> to:
>         }
>         $results .= $enddiv;  # needed this last closing </div>
>
>         $this->_body .= $results;
>         parent::assemblePluslet();
>
>         return $this->_pluslet;
>
>
------=_Part_298_12911927.1351618850978
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<div>We wanted the same thing where the "All Items by Source" was compresse=
d by type and each type can be individually display by clicking. We used th=
e expand icon to</div><div>indicate there is something to view. Below are t=
he changes we made to implemented it.</div><div><br></div><div>Gordie</div>=
<div><br></div><div>&nbsp;</div><blockquote class=3D"gmail_quote" style=3D"=
margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;=
"><p><span class=3D"Apple-style-span" style=3D"border-collapse: separate; c=
olor: rgb(0, 0, 0); font-family: Arial; line-height: normal; border-spacing=
: 0px; font-size: medium; "></span></p><div>Added show/hide,(display hidden=
/visible) feature to pluslet "All Items by Source"</div><div>1. Add css and=
 small script to &lt;head&gt; area of &nbsp;the header file, in this case I=
 added to our custom-header.phtml that is called by the header.php file</di=
v><div><br></div><div>[css stuff]</div><div>.nolooky {</div><div>&nbsp;&nbs=
p;&nbsp;&nbsp; display : none;</div><div>&nbsp;&nbsp;&nbsp;&nbsp; }</div><d=
iv><br></div><div>[script]</div><div>&lt;script&gt;&lt;script&gt;</div><div=
>function showhide(id){</div><div>&nbsp;&nbsp;&nbsp;&nbsp; jQuery('#'+id).t=
oggle('slow');</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div>}</div><d=
iv>&lt;/script&gt;</div><div><br></div><div><br></div><div>2. Modify /sp/co=
ntrol/includes/classes/sp_Pluslet_1.php, in function output,</div><div>We r=
eally don't need the TOC, so we decided to disable it</div><div>from:</div>=
<div>&nbsp; &nbsp; &nbsp; &nbsp;/////////////////////////<div>&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Create TOC</div><div>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; /////////////////////////</div><div><br></div><div>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $TOC =3D self::createTOC();</div><=
div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_body =3D $TOC;</di=
v></div><div><br></div><div>to (comment out the TOC stuff):</div><div>&nbsp=
; &nbsp; &nbsp; &nbsp;/////////////////////////<div>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; // Create TOC</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; /////////////////////////</div><div><br></div><div>&nbsp; &nbsp=
; &nbsp; &nbsp; //$TOC =3D self::createTOC();</div><div><br></div><div>&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //$this-&gt;_body =3D $TOC;</div></d=
iv><div>--------------------</div><div>from:</div><div>&nbsp; &nbsp; &nbsp;=
 &nbsp; &nbsp; &nbsp; if ($this_source_id !=3D $last_source_id) {<div><br><=
/div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp; $results .=3D "&lt;p &nbsp;class=3D\"leftcolheade=
r\"&gt;&lt;a name=3D\"$myrow[4]\"&gt;&lt;/a&gt;$myrow[3]&lt;/p&gt;\n\n";</d=
iv><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; $last_source_id =3D $this_source_id;</div><div>&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; $res_class =3D "dbresults no-border";</div><div>&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {</div><div>&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; $res_class =3D "dbresults";</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</div></div><div><br></div><div>=
to:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($this_source_id !=3D $=
last_source_id) {<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$resu=
lts .=3D "$enddiv"; #first time through $enddiv is blank which is what we w=
ant</div></div><p></p></blockquote><blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;"><p><span class=3D"Apple-style-span" style=3D"border-collapse: separat=
e; color: rgb(0, 0, 0); font-family: Arial; line-height: normal; border-spa=
cing: 0px; font-size: medium; "></span></p><div><div>&nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp;$nolooky_id +=3D 1; &nbsp;</div><div>&nbsp; &nbsp=
; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$nolooky_id_name =3D sprintf("nolooky_i=
d_%d",$nolooky_id); &nbsp;# create unique id names for each information typ=
e</div><div><br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $results .=3D "&lt;p onclick=3D\=
"showhide('{$nolooky_id_name}')\" class=3D\"leftcolheader\"&gt;&lt;img src=
=3D\"/sp/assets/images/icons/expand.png\" /&gt;&amp;nbsp;&amp;nbsp;&lt;a na=
me=3D\"$myrow[4]\"&gt;&lt;/a&gt;$myrow[3]&lt;/p&gt;\n\n&lt;hr&gt;&lt;div id=
=3D\"{$nolooky_id_name}\"class=3D\"nolooky\"&gt;";</div><div>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; $last_source_id =3D $this_source_id;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $enddiv =
=3D "&lt;/div&gt;";</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $res_class =3D "dbresults no-=
border";</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; } else {</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $res_class =3D "dbresults";</=
div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 }</div></div><div>---------------------</div><div>And a little lower down,=
 from:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }<div><br></div><div>&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;_body .=3D $results;</div><div>=
<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parent::assembleP=
luslet();</div><div><br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; return $this-&gt;_pluslet;</div></div><div><br></div><div>to:</div><div>=
&nbsp; &nbsp; &nbsp; &nbsp; }<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; $results .=3D $enddiv; &nbsp;# needed this last closing &lt;/div&gt;</div=
><div><br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;_=
body .=3D $results;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; parent::assembleP=
luslet();<br></div><div><br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; return $this-&gt;_pluslet;</div></div><div><br></div><p></p></blockq=
uote>
------=_Part_298_12911927.1351618850978--

------=_Part_297_16721085.1351618850977--