|
Page 1 of 2
|
christmanrd
Joined: October 2008
Posts: 206
Location: Pennsylvania
|
Blocks Management - Limiting The Number Of Characters Displayed In A Block
I have a block named, "XYZ". It shows on the homepage in the center column.
The, "XYZ" block has approximately 3000 characters being displayed. I do not want all of the characters to be displayed all of the time so, can I limit the number of characters that are displayed in the block like I can do in the NEWS Block?
Please look at the signature block for ICY Phoenix info and link to the site.
Thank you,
David
____________ Another Pro Bono
Version of Icy Phoenix: 1.3.0.53a
Version of PHP: 5.2.9
Version of MySQL: 5.0.81-community-log
Board started: 2009/07/18 - 11:50
Registered Users: 123 as of 17 Sep 09
|
#1 Thu 30 Jul, 2009 13:26 |
|
Sponsors
|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
Inactive User
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
Try this.
Save the script below as blair.html and open it in your bowser so that you can see what it does etc. Then try to apply the js and markup to your html block.
<script type="text/javascript">
function showdiv(d) {
var obj = document.getElementById(d);
obj.style.visibility = "visible";
obj.style.pixelTop = 20;
obj.style.pixelLeft = 20;
}
function hidediv(d) {
var obj = document.getElementById(d);
obj.style.visibility = "hidden";
}
</script>
<p style="padding-left: 15px;">
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights that among these are Life, Liberty and the pursuit of Happiness. We insist on political leaders of integrity who will stand on principles and abide by the Constitution that our forefathers set forth. Compelled to establish no alliances with one political party we will strive to locate representatives who respect the belief of their fellow citizens and represent the will of the People. It is our unending resolve to bring back the philosophy of the power of the People and limitation of the government. We will pursue the removal of any elected official who fails to honor their oath to support, defend, and bear true faith and allegiance to the Constitution of the United States.
</p>
Click <a href="javascript:showdiv('blairDiv')" class="forumlink">Show</a> & <a href="javascript:hidediv('blairDiv')" class="forumlink">Hide</a>
<div id="blairDiv" style="visibility:hidden; position:relative; top:0px; left:0px; height:20px;z-index: 999999;">
BLAIR COUNTY TEA PARTY ORGANIZATION DEMANDS
<p>
Stop massive spending of borrowed/printed money. Avoid increasing the debt to foreign countries and to our children/grandchildren. Reverse the rapid slide toward socialism and away from free enterprise and individual initiative. Constitutional amendment setting term limits for House and Senate. Constitutional amendment requiring a balanced budget without borrowing, except for act of war declared by Congress. No more earmarks or bailouts. Replace the stimulus bill with a fiscally prudent measure. Aggressively reduce government control, size, and cost.
</p>
BLAIR COUNTY TEA PARTY ORGANIZATION GOALS
<p>
Replace lawmakers who:
* Vote for a 0 billion tax bill without even reading it?
* Are spending trillions of borrowed dollars, leaving a debt our great-grandchildren will be paying?
* Consistently give special interest groups billions of dollars in earmarks to help get themselves re-elected?
* Want to take your wealth and redistribute it to others?
* Punish those who practice responsible financial behavior and reward those who do not?
* Admit to using the financial hurt of millions as an opportunity to push their political agenda?
* Run up trillions of dollars of debt and then sell that debt to countries such as China?
* Want government controlled health care?
* Want to take away the right to vote with a secret ballot in union elections?
* Refuse to stop the flow of millions of illegal immigrants into our country?
* Appoint a defender of child pornography to the Number 2 position in the Justice Department?
* Want to force doctors and other medical workers to perform abortions against their will?
* Want to impose a carbon tax on your electricity, gas and home heating fuels?
* Want to reduce your tax deductibility for charitable gifts?
* Take money from your family budget to pay for their federal budget?
</p>
</div>
Last edited by Guest on Fri 31 Jul, 2009 09:49; edited 3 times in total |
#2 Fri 31 Jul, 2009 02:35 |
|
christmanrd
Joined: October 2008
Posts: 206
Location: Pennsylvania
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
Slick, very slick.
I copied and pasted it in to a html as suggested by using DW CS3 and it was NICE.
I then copied it to the specific Block and hit SUBMIT.
Then heading over to Home to look at the results. I even had a smile on my face. It looked great.
When I clicked on SHOW. The Block did not expand but the words were displayed over the rest of the blocks beneath it.
Dave
____________ Another Pro Bono
Version of Icy Phoenix: 1.3.0.53a
Version of PHP: 5.2.9
Version of MySQL: 5.0.81-community-log
Board started: 2009/07/18 - 11:50
Registered Users: 123 as of 17 Sep 09
|
#3 Fri 31 Jul, 2009 03:04 |
|
Inactive User
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
christmanrd wrote: [View Post] When I clicked on SHOW. The Block did not expand but the words were displayed over the rest of the blocks beneath it.
Dave
So it's transparent?
I've edited the script I posted - So you can have a go at that one.
But to expand the block it would have to be done a different way.
|
#4 Fri 31 Jul, 2009 03:54 |
|
christmanrd
Joined: October 2008
Posts: 206
Location: Pennsylvania
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
I appreciate your help.
I tried the edited script and as you said, it still does not expand.
Any other ideas?
What I have done is change from HTML to BBCODE and used the Spoiler tag. For now it works and can be seen at the site.
Dave
____________ Another Pro Bono
Version of Icy Phoenix: 1.3.0.53a
Version of PHP: 5.2.9
Version of MySQL: 5.0.81-community-log
Board started: 2009/07/18 - 11:50
Registered Users: 123 as of 17 Sep 09
|
#5 Fri 31 Jul, 2009 11:48 |
|
Inactive User
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
Sorry it's not what you wanted.
IPv1.3 uses highslide, and from memory Highslide (default) includes expanders for various applications, but I don't know what Highslide javascript has actually been added to IP, as I don't have it installed. (Yet)
If you download highslide and check out the syntax for the various apps, you may find something useful there. Else you could google for javascript expanders and see if there's something you could simply add to the script.
I don't really know what's best for you without installing IP 1.3, grabbing your text, and having a play. But installing IPv1.3 is not something I really want to do at this stage.
So hopefully, someone else will come along and add their 2c worth to resolve what you trying to achieve.
|
#6 Fri 31 Jul, 2009 12:55 |
|
christmanrd
Joined: October 2008
Posts: 206
Location: Pennsylvania
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
Again,
I appreciate your help.
Just a thought, you could register on my site and I could give you Admin Privileges. If that would help.
____________ Another Pro Bono
Version of Icy Phoenix: 1.3.0.53a
Version of PHP: 5.2.9
Version of MySQL: 5.0.81-community-log
Board started: 2009/07/18 - 11:50
Registered Users: 123 as of 17 Sep 09
|
#7 Fri 31 Jul, 2009 13:03 |
|
spydie
Joined: December 2008
Posts: 1796
Location: In the Boxes
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
Quote: IPv1.3 uses highslide, and from memory Highslide (default) includes expanders for various applications, but I don't know what Highslide javascript has actually been added to IP, as I don't have it installed. (Yet)
Highslide JS version is : 4.0.12 from February 2009.
Well that´s what My script tells me.
____________ Out of Order
|
#8 Fri 31 Jul, 2009 13:37 |
|
christmanrd
Joined: October 2008
Posts: 206
Location: Pennsylvania
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
Spydie,
Thanks for the info.
I did a google search and went to: Highslide where I downloaded their Highslide Editor.
But, my problem is, I DO NOT KNOW WHAT I AM DOING.
Again,
Thanks,
David
____________ Another Pro Bono
Version of Icy Phoenix: 1.3.0.53a
Version of PHP: 5.2.9
Version of MySQL: 5.0.81-community-log
Board started: 2009/07/18 - 11:50
Registered Users: 123 as of 17 Sep 09
|
#9 Fri 31 Jul, 2009 16:44 |
|
Inactive User
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
Re the Admin offer - I'll have to knock that back I'm afraid.
If no-one comes up with anything in the next couple of days - I'll have another look at it for you.
Edit:
I gave HighSlide a miss, but you can try this one:
<script type="text/javascript">
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
} else {
e.style.display="none"
}
return true;
}
</script>
<p style="padding: 10px 15px 0 15px;">
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights that among these are Life, Liberty and the pursuit of Happiness. We insist on political leaders of integrity who will stand on principles and abide by the Constitution that our forefathers set forth. Compelled to establish no alliances with one political party we will strive to locate representatives who respect the belief of their fellow citizens and represent the will of the People. It is our unending resolve to bring back the philosophy of the power of the People and limitation of the government. We will pursue the removal of any elected official who fails to honor their oath to support, defend, and bear true faith and allegiance to the Constitution of the United States.
</p>
<div id="para1" style="display:none">
<br />
<p style="padding: 0 15px 0 15px;">
<strong>BLAIR COUNTY TEA PARTY ORGANIZATION DEMANDS</strong>
<br /><br />
Stop massive spending of borrowed/printed money. Avoid increasing the debt to foreign countries and to our children/grandchildren. Reverse the rapid slide toward socialism and away from free enterprise and individual initiative. Constitutional amendment setting term limits for House and Senate. Constitutional amendment requiring a balanced budget without borrowing, except for act of war declared by Congress. No more earmarks or bailouts. Replace the stimulus bill with a fiscally prudent measure. Aggressively reduce government control, size, and cost.
</p>
<br />
<p style="padding: 0 15px 0 15px;">
<strong>BLAIR COUNTY TEA PARTY ORGANIZATION GOALS</strong>
<br /><br />
Replace lawmakers who:
<br /> * Vote for a 0 billion tax bill without even reading it?
<br /> * Are spending trillions of borrowed dollars, leaving a debt our great-grandchildren will be paying?
<br /> * Consistently give special interest groups billions of dollars in earmarks to help get themselves re-elected?
<br /> * Want to take your wealth and redistribute it to others?
<br /> * Punish those who practice responsible financial behavior and reward those who do not?
<br /> * Admit to using the financial hurt of millions as an opportunity to push their political agenda?
<br /> * Run up trillions of dollars of debt and then sell that debt to countries such as China?
<br /> * Want government controlled health care?
<br /> * Want to take away the right to vote with a secret ballot in union elections?
<br /> * Refuse to stop the flow of millions of illegal immigrants into our country?
<br /> * Appoint a defender of child pornography to the Number 2 position in the Justice Department?
<br /> * Want to force doctors and other medical workers to perform abortions against their will?
<br /> * Want to impose a carbon tax on your electricity, gas and home heating fuels?
<br /> * Want to reduce your tax deductibility for charitable gifts?
<br /> * Take money from your family budget to pay for their federal budget?
</p>
</div>
<br />
<input type="button" class="gensmall" style="border: 0px;" onclick="return toggleMe('para1')" value="Expand / Collapse" />
<br />
You may want to add extra markup, but I'll leave that up to you.
Edited by Guest, Tue 11 Aug, 2009 00:15: Changed input type |
#10 Fri 31 Jul, 2009 23:06 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7191
Location: Borgo San Michele
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
You can use the same CODE used for spoiler (if I understand correctly what you need).
Everything is already included in Icy Phoenix and you just need to add the proper markup.
If you need I can tell how to do.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#11 Mon 10 Aug, 2009 21:20 |
|
christmanrd
Joined: October 2008
Posts: 206
Location: Pennsylvania
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
Thanks Mighty Gorgon!
The issue had to be resolved and since it could not be, I had to use another method of displaying the content that was needed.
Icy Phoenix Rocks!
Thank you Sir.
____________ Another Pro Bono
Version of Icy Phoenix: 1.3.0.53a
Version of PHP: 5.2.9
Version of MySQL: 5.0.81-community-log
Board started: 2009/07/18 - 11:50
Registered Users: 123 as of 17 Sep 09
|
#12 Mon 10 Aug, 2009 21:33 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7191
Location: Borgo San Michele
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
I didn't understand if you need it or note... anyway try this HTML code inserted in a brand new block.:
<div class="spoiler">
<div class="code-header" id="spoilerhdr_NEWS001" style="position: relative;">Show: [ <a href="#" onclick="ShowHide(\'spoiler_NEWS001\', \'spoiler2_NEWS001\', \'\'); ShowHide(\'spoilerhdr_NEWS001\', \'spoilerhdr2_NEWS001\', \'\'); return false;">Show</a> ]</div>
<div class="code-header" id="spoilerhdr2_NEWS001" style="position: relative; display: none;">Spoiler: [ <a href="#" onclick="ShowHide(\'spoiler_NEWS001\', \'spoiler2_NEWS001\', \'\'); ShowHide(\'spoilerhdr_NEWS001\', \'spoilerhdr2_NEWS001\', \'\'); return false;">Hide</a> ]</div>
<div class="spoiler-content" id="spoiler2_NEWS001" style="position: relative; display: none;">YOUR TEXT</div>
</div>
Please remember that you have to replace NEWS001 with a random code for each block you will create... since it is an ID you don't have to have duplicates.
Let me know if it is ok for you.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#13 Mon 10 Aug, 2009 21:54 |
|
christmanrd
Joined: October 2008
Posts: 206
Location: Pennsylvania
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
One question. Is that suppose to work with 1.2.0.27c? I just tried it on a 1.2.0.27c site and it does not show when I click on it.
Now is the time for all young men
<div class="spoiler">
<div class="code-header" id="spoilerhdr_NEWS001" style="position: relative;">Show: [ <a href="#" onclick="ShowHide(\'spoiler_NEWS001\', \'spoiler2_NEWS001\', \'\'); ShowHide(\'spoilerhdr_NEWS001\', \'spoilerhdr2_NEWS001\', \'\'); return false;">Show</a> ]</div>
<div class="code-header" id="spoilerhdr2_NEWS001" style="position: relative; display: none;">Spoiler: [ <a href="#" onclick="ShowHide(\'spoiler_NEWS001\', \'spoiler2_NEWS001\', \'\'); ShowHide(\'spoilerhdr_NEWS001\', \'spoilerhdr2_NEWS001\', \'\'); return false;">Hide</a> ]</div>
<div class="spoiler-content" id="spoiler2_NEWS001" style="position: relative; display: none;">to come to the aid of their country</div>
</div>
I have two icy sites and I forgot that I was on the 1.2.0.27c site when I tried the code.
____________ Another Pro Bono
Version of Icy Phoenix: 1.3.0.53a
Version of PHP: 5.2.9
Version of MySQL: 5.0.81-community-log
Board started: 2009/07/18 - 11:50
Registered Users: 123 as of 17 Sep 09
|
#14 Mon 10 Aug, 2009 22:15 |
|
spydie
Joined: December 2008
Posts: 1796
Location: In the Boxes
|
Re: Blocks Management - Limiting The Number Of Characters Displayed In A Block
Please remember that you have to replace NEWS001 with a random code for each block you will create... since it is an ID you don't have to have duplicates.
Let me know if it is ok for you.
Don´t see anything renamed in your code christmanrd
____________ Out of Order
|
#15 Mon 10 Aug, 2009 22:52 |
|
|
Page 1 of 2
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|