uCoz Community » uCoz Modules » Site News & Blogs » Brief and full description, "read more" link
Brief and full description, "read more" link
Natashko
Posts: 3366
Reputation: 171

Message # 1 | 2:52 PM
Site News: Brief and full description

Various ways of displaying entries are possible within Site News module. If you check “Show brief version of the text if it is too long box”, only the part of the brief version will be displayed on the page (the part limited by the option “Number of characters for a brief version”) together with “Read more” link. If you click on the link, the page with entry full text will open.

Another option is to use “Entry brief description“ as a field of a new entry form. In this way the content of “Short description” field will be displayed on the main page (of site or module). And when you click on the entry name, the content of “Entry full text” will be displayed.

If you forbid a user group (for example Guests) to Read entries, they will be able to see only the content of Short description on the main page.
If you forbid a user group (for example Guests) to view the main page, they will not be able to see Short description of the entry.

Site News module doesn't have its own main page as other catalog-modules do. That is why the code responsible for outputting news is added to Home page content by default.
If you have messed up with the code when editing it – the news are not going to be displayed.

The code that outputs news:
Code
<?if($ADD_ENTRY_LINK$)?><div align="right" style="padding-bottom:3px;">[ <a href="$ADD_ENTRY_LINK$">Add entry</a> ]</div><?endif?>$LAST_NEWS$


FREQUENTLY ASKED QUESTIONS

Where can I set the number of characters in Short description?
Control panel->Site News->Module settings-> Number of characters for a brief version
The news ends up with ellipsis (dots) in Short description. Can I substitute it with my own character?
Unfortunately, it is not possible.
Is it possible to output only Entry name on Site News page so that the news itself will be located on the other page?
Yes, it is possible. You need to hide Short description. It can be done by editing Appearance of entries template in Control panel->Design->Design management (templates)->Site news
There are big spaces in the text of full description of the entry. How to fix it?
Most probably you used Word to embed the text. It is highly unrecommended. Copy and paste the text into Notepad and then from the Notepad to the website.
Can I use “Entry brief description” option for one news only?
Unfortunately, it is not possible by means of standard system solutions. Scripts might help you.
Is it possible to display news on the main page in the way they are displayed on the Page with entries full text and its comments?
No. Full text can not be displayed on the main page.
Can I display Entry names only?
Yes, it can be done by means of Informers. See more about them here: http://forum.ucoz.com/forum/37-457-2206-16-1206353355
Another option is to edit Appearance of entries template.
What is the maximum number of characters in the “Entry full text”?
40 000 characters.
Where can I change “Read more” in Short description?
Control panel->Substitution of default phrases->Site News
Which part of Style sheet CSS is responsible for changing the color of “Read more” inscription?
Control panel->Design->Design management (CSS)->class entryReadAllLink
How can I substitute “Read more” inscription with an image?
Control panel->Substitution of default phrases->Site News->substitute the text with HTML code of the image, like:
Code
<img src="...">


carloscompu
Posts: 246
Reputation: 1

Message # 61 | 12:46 PM
moviecube.do.am

and

porsiempre.do.am
Sunny
Posts: 9296
Reputation: 456

Message # 62 | 11:29 AM
There is the following in CSS

Code
input,textarea,select {vertical-align:middle; font-size:8pt; font-family:verdana,arial,helvetica;}


You need to add here the sizes you need, e.g. width:100px;

Code
input,textarea,select {width:100px;vertical-align:middle; font-size:8pt; font-family:verdana,arial,helvetica;}

I'm not active on the forum anymore. Please contact other forum staff.
carloscompu
Posts: 246
Reputation: 1

Message # 63 | 7:56 AM
I need help to add entry description to the full text and comment seccion of blog

I cant find the $BRIEF$ code

Is there a Way to add description to the blog full entry?
Post edited by carloscompu - Saturday, 2013-04-27, 8:13 AM
Sunny
Posts: 9296
Reputation: 456

Message # 64 | 12:09 PM
carloscompu, sorry, I don't understand what you mean. You can enable the brief description field for Blog in the Blog module settings.
I'm not active on the forum anymore. Please contact other forum staff.
carloscompu
Posts: 246
Reputation: 1

Message # 65 | 4:46 PM
Yes I know you can set it up but its not showing in the Blog full text and comment template I want to add the $BRIEF$ code like all other module
Sunny
Posts: 9296
Reputation: 456

Message # 66 | 12:29 PM
Quote (carloscompu)
Blog full text and comment template


This is the page with the full entry text, of course the brief description is not displayed here, not only in Blog but in all other modules. The brief description is displayed on the module main page and category/section pages.

I'm not active on the forum anymore. Please contact other forum staff.
carloscompu
Posts: 246
Reputation: 1

Message # 67 | 1:34 AM
I have used fbrief befor in other pages I think its in load , publisher and boards full text entries
These are the modules I always use

Thats why I felt strange when I didnt see it in this module.
I dont want to rebuild the template so please is there a solution,
is there a way to aply it Even with a get code.Thats all Im asking
IoCiScommetto
Posts: 42
Reputation: 0

Message # 68 | 12:14 PM
Hello,

I use an Informer to display all Site News on my Home Page, and when the user click on the entry name he is redirected to the entry page.
I'd like to allow just the registered user to read the full $MESSAGE$, while guests should read just the Brief description.
I meant to use a simply conditional code, but I don't know which kind of code I should use to show the Brief description, cause I tried with $BRIEF$ and it doesn't work.

<?if($USER_LOGGED_IN$)?>$MESSAGE$<?else?>$BRIEF$<?endif?>

How can I do?

Thank you for your help

My site about betting: http://scommesse.ucoz.com
Sunny
Posts: 9296
Reputation: 456

Message # 69 | 1:20 PM
IoCiScommetto, $BRIEF$ is not available in the "Page with full entry text and associated comments" template. I can suggest the following ways to do what you need:

1. Use a custom field for a brief description. In this case your code will look like this:

Code
<?if($USER_LOGGED_IN$)?>$MESSAGE$<?else?>$OTHER1$<?endif?>


You might need to replace OTHER1 with the corresponding custom field number - OTHER2, OTHER3 etc. And please note that the max. length of a custom field is 140 characters.

2. When posting an entry, wrap the text that should be hidden from guests by the <span> tag, e.g.

Code
<span class="guests">Text</span>


and then add the following to the template:

Code
<?if(!$USER_LOGGED_IN$)?><style>.guests {display:none} </style><?endif?>


This code will hide the text within the span tags from guests.

I'm not active on the forum anymore. Please contact other forum staff.
IoCiScommetto
Posts: 42
Reputation: 0

Message # 70 | 11:57 PM
Sunny, thanks for your reply!

I found a different and easier solution: I use the code "Available to users only". I'd like though to modify the text that is displayed to Guests.

Can I do it in some way?

My site about betting: http://scommesse.ucoz.com
Sunny
Posts: 9296
Reputation: 456

Message # 71 | 12:34 PM
IoCiScommetto, please provide a screenshot of the text you want to modify..
I'm not active on the forum anymore. Please contact other forum staff.
IoCiScommetto
Posts: 42
Reputation: 0

Message # 72 | 9:24 AM
Sorry, I just realized that the BB code was hidden. I used the BB code "hide" for the portion of text that I want to display just to registered users. In this way guests can read just the first lines, and then there is a message, with a link to the Login form. I'd like to modify that text with a message in italian, that is the language of the website.
Thank you

My site about betting: http://scommesse.ucoz.com
Sunny
Posts: 9296
Reputation: 456

Message # 73 | 12:31 PM
IoCiScommetto, it is possible with the help of a script. I will try to find the necessary script.
I'm not active on the forum anymore. Please contact other forum staff.
Sunny
Posts: 9296
Reputation: 456

Message # 74 | 4:29 PM
IoCiScommetto, here is the script, should be pasted after $BODY$ in the necessary template: http://forum.ucoz.com/forum/9-13044-77789-16-1307540059
I'm not active on the forum anymore. Please contact other forum staff.
IoCiScommetto
Posts: 42
Reputation: 0

Message # 75 | 6:44 PM
Thank you for your help. Unfortunately it doesn't work for me.
I pasted the code after $BODY$ in the "page with full entry text and associated comments" of the site news.

The code I wrote is this

Code
<script>  
  e=document.getElementsByTagName("span");  
  for(i=0;i<e.length;i++) {  
  if(e[i].className=='UhideBlockL') {  
  e[i].innerHTML=e[i].innerHTML.replace('Available to users only','Effettua il Login per continuare a leggere');  
  }  
  }  
  </script>


But when I try to visualize the page with guest rights I still read 'Available to users only' and not my personalized text.

Which is my mistake?

My site about betting: http://scommesse.ucoz.com
uCoz Community » uCoz Modules » Site News & Blogs » Brief and full description, "read more" link
Search: