Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 25, 2012, 06:32:22 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155521
Posts in
21712
Topics by
7736
Members
Latest Member:
chris85
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
Styling TEXT_READ_MORE not allowed nor page CSS settings
Pages: [
1
]
Go Down
Author
Topic: Styling TEXT_READ_MORE not allowed nor page CSS settings (Read 1688 times)
D72
Offline
Posts: 253
Styling TEXT_READ_MORE not allowed nor page CSS settings
«
on:
July 07, 2009, 10:11:32 PM »
I have a silly thing going here.
I am trying to test a website. Nothing special here.
Made a template and i'm placing the html codes into the page settings of, in this case the news module.
Everything is ok, but...
When i want to syle the 'Read more' tag, i'm experiencing some strange behaviour.
As i plave the read more tag in a <div> or simply add a class to the read more, suddenly n the frontend, every article has the read more link.
When i leave the original read more in the settings as it is, nothing is happening and there are only read more links shown by the articles wich has a full story.
Why is that? Why can't i style my read more tab in the page settings?
Second problem is, when i go to the settings of a page and choose to Edit CSS, it brings me to a blank page.
It won't take me anywhere where is can change the CSS. How come this is happening?
This is the original page setting of WB
Code:
<tr class="post_top">
<td class="post_title"><a href="[LINK]">[TITLE]</a></td>
<td class="post_date">[MODI_TIME], [MODI_DATE]</td>
</tr>
<tr>
<td class="post_short" colspan="2">
[SHORT]
<a href="[LINK]">[TEXT_READ_MORE]</a>
</td>
</tr>
And this is what i want to use. Everything is working correctly, except the readmore which is shown by every single article instead of the articles with full stories.
Code:
<div class="article">
<div class="date">[MODI_DATE]</div>
<h2>[TITLE]</h2>
[SHORT]
<div class="read_more"><a href="[LINK]">[TEXT_READ_MORE]</a></div>
</div>
If i only change the original into this:
Code:
<tr class="post_top">
<td class="post_title"><a href="[LINK]">[TITLE]</a></td>
<td class="post_date">[MODI_TIME], [MODI_DATE]</td>
</tr>
<tr>
<td class="post_short" colspan="2">
[SHORT]
<a href="[LINK]" class="read_more">[TEXT_READ_MORE]</a>
</td>
</tr>
The read more isnt working properly anymore is shown at every article again.
Odd, isn't it? Anyone who knows why this is happening?
It's pretty annoying that i can't style a simple tag and don't have access to edit CSS from the backend.
gr
Dave
Logged
BerndJM
Offline
Posts: 1764
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #1 on:
July 07, 2009, 11:13:15 PM »
Hi,
ever thought about styling it this way:
Code:
.post_short a {
...
}
?
Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #2 on:
July 07, 2009, 11:18:01 PM »
Yes, to be honest that was the second shot i tried.
I am uploading some core files and rewriting some where i have made some changes in it.
Maybe there is someting i screwed.
Will add any progresses in here as soon as i found something.
Logged
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #3 on:
July 08, 2009, 12:07:38 AM »
I am really getting annoyed at the moment.
I'm trying for many hours to figure out why i am not in the position to style my readmore tags, the back tags and why i can't edit the settings CSS.
I have replaced most of the files on the server with core files of WB, but nothing seems to help.
Anybody got a clue why this is?
Anyone who's curious to have a peek what it looks like and to understand what i'm dealing with:
Click
Go to the English Home or News pages. In there you'll see articles. In the titles you can read which articles has a full story and which not. Article with full stories should have the Read more button. Articles without full stories should not hae the read more button.
But as you can see, they ALL got read more buttons. Only full story articles got the text read more. That's the only diference.
I've gotta catch some sleep. These kind of probs getting me a headache.
At least thanks for reading guys!
Dave
Logged
Luisehahne
Board Member
Development Team
Offline
Posts: 3146
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #4 on:
July 08, 2009, 12:36:14 AM »
To change core files is always dangerous. It's a very complex system. Before changing anything i rename the old files to get a restore. Which core files do you change?
greetings
Dietmar
Logged
We are human beings - and nobody is perfect at all.
kweitzel
Forum administrator
Offline
Posts: 6975
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #5 on:
July 08, 2009, 08:27:56 AM »
You would need to display the containing DIV only if there is a full story. Not sure if this works in the settings of the newsmodul though.
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7973
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #6 on:
July 08, 2009, 09:35:43 AM »
Hello,
maybe it is a good idea to add this as a task to our repository page.
It shouldn't be to hard to add a piece of code to the news modul core files wich shows the read_more link only if there is a content in the long_text.
In a second step, or a future version, maybe we could make this optional (choosable per post) to show or show not the read more link.
Not shure if we can manage this for WB 2.8 but we should add it to features list for common versions.
Matthias
Logged
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #7 on:
July 08, 2009, 10:13:47 AM »
Ok, do i understand right?
It's a familiar issue...? At least, i can't touch the read_more.
That's really odd. Even if i leave the a href tag in it's original state and only style it by css... the read more button is visible at all articles again. This is frustrating me. I have gave it a try to use display:none; in the CSS, but the readmore button won't show up at articles where is must be visible.
This is crazy...
Can't i modify a core file of WB where i can add a class or even an ID to it? Or isn;t there any other possibilty to style that html tag.
not that it's concerning to anyone, but when i design a website, i allways use read more buttons and allways style them. it's a great way to give your layout a special character. At least in my case because i allways try to make visual attractive web layouts.
I will have more tests today. just can't believe this is not possible.
Quote
To change core files is always dangerous. It's a very complex system. Before changing anything i rename the old files to get a restore. Which core files do you change?
Replacing the files succeeded. I havent experienced any negative behaviour. And yes, i first made a backup of those files
Quote
You would need to display the containing DIV only if there is a full story. Not sure if this works in the settings of the newsmodul though.
I know. WB does this automaticly. But as soon it's effected bij css it's having his own life. For me really not understandable.
Quote
maybe it is a good idea to add this as a task to our repository page.
I hope so. It's something tiny and definitely not a big problem. For me it's something default, styling read more buttons. But i really appreciate it if this solved in 2.8 And any tips 'n tricks for 2.7 about this...
Would love to make use of it.
«
Last Edit: July 08, 2009, 10:17:27 AM by D72
»
Logged
kweitzel
Forum administrator
Offline
Posts: 6975
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #8 on:
July 08, 2009, 01:48:08 PM »
Quote
Quote
You would need to display the containing DIV only if there is a full story. Not sure if this works in the settings of the newsmodul though.
I know. WB does this automaticly. But as soon it's effected bij css it's having his own life. For me really not understandable.
You can not do this kind of task by CSS. You would need to take some php-code and display the "read more" link if there is a longtext. But I think you could still get what you want if you have a look at the anynews snippet and alter it to your needs. It will be less work and less problematic than touching the news module files yourself.
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #9 on:
July 08, 2009, 01:53:48 PM »
Ok, thats something to look into.
Right now i made some dramatic changes. I have totally de-installed WB, made a new database and completely installed a fresh WB. I am in the early stage of testing my problems, but i have to say that i am able right now to edit the CSS in the page settings. This was not possible with my previous install.
So i guess one poblem is solved. I'm hopefull that i might be able to change the read more also when i'm gettign there.
I guess there had to be corrupt in my other install. But can't point my finger onto something as i had replaced some core files. But it's going quite ok now. I'll keep it updated here.
Logged
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #10 on:
July 08, 2009, 07:46:45 PM »
Ooookay...
i give up. I seems that it's not impossible to style the 'read more' link/button on the frontend.
That sucks. I tried everything, but the problem is. When you create a page based on the News module, you make a news article WITHOUT the full/long story, there shouldnt be a read more link on the frontend of the website.
When you do type text in the long story area, the read more button appears on the frontend.
But... in fact, in both cases the read more link is present.
It looks like this:
Below is an article without text for the long story:
Code:
<tr class="post_top">
<td class="post_title"><a href="http://www.blabla.com/pages/posts/article-one-without-full.php">Article one without full</a></td>
<td class="post_date">3:04 PM, Jul 08 2009</td>
</tr>
<tr>
<td class="post_short" colspan="2">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<a href="http://www.blabla.com/pages/posts/article-one-without-full.php"></a>
</td>
Below is an article WITH text for the long story:
Code:
<tr class="post_top">
<td class="post_title"><a href="http://www.blabla.com/pages/posts/article-one-with-full.php">Article two with full</a></td>
<td class="post_date">3:04 PM, Jul 08 2009</td>
</tr>
<tr>
<td class="post_short" colspan="2">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<a href="http://www.blabla.com/pages/posts/article-two-with-full.php">Read More</a>
</td>
The only difference is that 'Read More' is added to the read more url at the first article.
Why is het coded like this? I mean, can't it be, that the whole a href tag is gone and only shows up when people add text in Full story?
Now i understand why i am not able to style the read more button, because it's allways there!
Hopefully this will be different in the release of 2.8
I have installed RC 2.8 today, and it's exact the same in that version unfortunately.
At least i gave it a try and i'm aware that it's not possible at the moment.
gr
Dave
Logged
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #11 on:
July 08, 2009, 08:05:48 PM »
Thank you Clara. I havent thought about it.
I have placed a ticket. Hopefully i did it right... :S
gr
Dave
Logged
Ruud
WebsiteBaker Org e.V.
Offline
Posts: 2295
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #12 on:
July 09, 2009, 02:18:40 PM »
Quote
The only difference is that 'Read More' is added to the read more url at the first article.
Why is het coded like this? I mean, can't it be, that the whole a href tag is gone and only shows up when people add text in Full story?
Now i understand why i am not able to style the read more button, because it's allways there!
The problem is that the <a href=[LINK]> tag is created in the template(part). The module cannot decide to remove something from the template.
The solution to hide the link (by not adding the "Read more" text) is not the best, but it will work for most.
Styling the link (using style="" of CSS) with colors, positions etc.. should not make a huge difference.
If you add a fixed text (like "Lees verder...") in the template the "trick" will not work. You could edit the WB languagefiles to get the same result.
Since the link cannot be removed, the only solution might be to add an extra template parameter (like [SHOW_READ_MORE] ) that will add
style="visibility:hidden"
to the <a> or <div> tag.
This should be not too difficult to implement.
Ruud
Logged
Professional WebsiteBaker Solutions
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #13 on:
July 09, 2009, 04:48:51 PM »
i agree.
For now i have created some style sheets to the read more.
i only used some padding, line-height instead of height. no display:block, float:right and some colors.
That won't effect the visibility when there is actually no full text.
Unfortunately in IE7 you still can see the read more because IE below 8 can't handle pretty welll with marges and paddings. I'm gonna try some conditional comments for ie7 and i will give your visibility:hidden also a try.
Thanks Ruud, havent thought about the visibility:hidden
But is this not possible in the new WB. That the readmore links get a different behaviour as it is right now.
It's not quite a default way of working as it is. I understand that WB has it's own build, but still. Would be nice though. Styling a read more link, surrounded by a <div> is not that special and should be a way to do it
Logged
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7973
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #14 on:
July 09, 2009, 10:31:34 PM »
Hello, just an idea:
replace in add.php:
Code:
<a href=\"[LINK]\">[TEXT_READ_MORE]</a>
with something like this:
Code:
[READ_MORE]
and then add in view.php something like this
Code:
//work out if we need a read more button or not
query database if there is content in the long-text
if yes
[READ_MORE] = <a href=\"[LINK]\">[TEXT_READ_MORE]</a>
if no
[READ_MORE] =
Just an idea, maybe a coder could realize this.
Matthias
«
Last Edit: July 10, 2009, 05:35:22 AM by ruebenwurzel
»
Logged
Ruud
WebsiteBaker Org e.V.
Offline
Posts: 2295
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #15 on:
July 09, 2009, 10:45:34 PM »
Just updated a workaround in
SVN
.
Quote from: ruebenwurzel on July 09, 2009, 10:31:34 PM
Hello, just an idea:
replace in add.php:
if yes
[READ_MORE] = <a href=\"[LINK]\">[TEXT_READ_MORE]</a>
if no
[READ_MORE] =
Creating a full link with one variable is not a good thing. You will not be able to change the READ_MORE text to your own local version.
Unfortunatly the is no [IF] [THEN] [ELSE] method in the templates, so it will be impossible to really remove something.
I added a template variable called [SHOW_READ_MORE] that is used like
<span style="visibility:[SHOW_READ_MORE];"><a href=...>[READ_MORE]</a></span>
This way the link is still generated (nothing to do about that), but not visible regardless any following styling.
Ruud
«
Last Edit: July 09, 2009, 10:48:25 PM by Ruud
»
Logged
Professional WebsiteBaker Solutions
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #16 on:
July 09, 2009, 10:48:22 PM »
Yes,
That is something i mean. Unfortunately i am NO coder.
Think i never be one too. But your idea makes sense it looks very reasonable.
Fingers crossed that a php dude is stopping by here and is in the mood for some contribution.
Logged
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #17 on:
July 09, 2009, 11:02:39 PM »
couldn't post my reply because you were posting yours at the very same time... never had that before... funny...
But Ruud, you've made me amazed again. You do wonderful things for WB and what i've seen around here, solutions, contributions...
This is so great you've found a workaround. I discovered that also that it was not possible to play with php variables as the structure of it is sent by the template. But this is a great solution.
I will try to use it tomorrow and throw my css skills on it. But i'm pretty sure this will do it.
The way i did it right now is acceptable. But visitors with ie7 and lower will experience some weird appearences.
This should do it! Thank you so much...
Will give feedback as i'm done with it.
Nighty nite...
Logged
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7973
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #18 on:
July 10, 2009, 05:50:03 AM »
@ruud
Quote
Unfortunatly the is no [IF] [THEN] [ELSE] method in the templates, so it will be impossible to really remove something.
Yes, i know, thats why i meant to make this in the view.php. You seem to have overread this.
Quote
You will not be able to change the READ_MORE text to your own local version.
Also wrong. [TEXT_READ_MORE] is taken from language file (one of the new features of WB 2.8 you may also overseen this). So should be automatically in the right language. This i think is enough for the most WB-Users. For all others who wanna go deeper in configuration they can replace the code in the settings of the news modul to the old one.
But no matter, your solution is in the frontend also bringing the wished result. Peersonally i prefer not only to hide a link if it is not needed, better would be to not have a link if it is not needed.
The only thing wich should be additionally added to SVN is to add to the upgrade-script the upgrading the database of all existing news pages. Can you add this please too?
Matthias
Logged
D72
Offline
Posts: 253
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #19 on:
July 10, 2009, 07:36:05 AM »
Quote
Peersonally i prefer not only to hide a link if it is not needed, better would be to not have a link if it is not needed.
I totally agree. I have a slight feeling that this story will have a happy ending.
Unfortunately i can only wait and see what others create to make this work. I just woke up, will have a cup of coffee, rub my eyes a couple of times, wash myself and will test Ruud's solution.
* I'm excited that people on the forum is taking such issues serious and are willing to help cq improve!
Logged
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7973
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #20 on:
July 11, 2009, 11:45:24 AM »
@ruud
tested your code changes and it works great. But if there is no long text also the link in the post_title should not be klickable.
Matthias
Logged
Ruud
WebsiteBaker Org e.V.
Offline
Posts: 2295
Re: Styling TEXT_READ_MORE not allowed nor page CSS settings
«
Reply #21 on:
July 11, 2009, 10:30:42 PM »
Quote from: ruebenwurzel on July 11, 2009, 11:45:24 AM
@ruud
tested your code changes and it works great. But if there is no long text also the link in the post_title should not be klickable.
Matthias
Fixed
that too.. Added a bit javascript logic to make the link unclickable.
Ruud
Logged
Professional WebsiteBaker Solutions
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...