Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-08-03 10:46:35

docutale
Member
Registered: 2012-08-03
Posts: 13

Turning off Timestamp and centering images.

Hi there,

I’m new to TP so i dont know much.
I set up my blog at imperial-music.net but there are a few things which i don’t know how to do.
I would like to turn off timestamp for just one blog post, I dont want the date showing, is this possible?

Also I would like to centre images in my posts as you can see here it looks all funny…

http://imperial-music.net/tp/index.php?s=artists

Offline

#2 2012-08-03 11:25:07

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Turning off Timestamp and centering images.

Surround the tag that’s used to output the date (txp:posted, txp:modified, txp:php, …) with the following code:

<txp:if_article_id id="your article's ID">
<txp:else />
   date tag goes here
</txp:if_article_id>

For several articles you can add further IDs and separate them with a comma.

Re centering images:
Assign them a class and assign this class the following rules in your stylesheet:
display: block; margin: 0 auto;


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2012-08-03 12:23:31

docutale
Member
Registered: 2012-08-03
Posts: 13

Re: Turning off Timestamp and centering images.

Im sorry im very much a newbie. I dont understand where to apply the code. Does it go in the specific blog post or does it go into sections, pages, forms, styles etc?

Offline

#4 2012-08-03 12:45:48

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Turning off Timestamp and centering images.

Styles go into the stylesheet, either on the styles tab, or into a file. On the artists section it’s the styles tab.

For finding the date you either go through pages and forms one by one and look for one of txp:posted, txp:modified, txp:php (probably it’s the posted tag), or you install smd_where_used (link in my signature) and let it do the search for you. Once you find the culprit, surround it with the above code. If in doubt, please post your code here.

It’d help if you post the correct link to the page in question, cause there’s no date on the artist’s section.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2012-08-03 13:19:30

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Turning off Timestamp and centering images.

Forgot to say that you’ll find the date most probably in the default form. Tst.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2012-08-17 10:00:26

docutale
Member
Registered: 2012-08-03
Posts: 13

Re: Turning off Timestamp and centering images.

Hi there,

Sorry for the long delay, i havent had time to get back to this. I’m still having serious trouble working out where to put the display: block; margin: 0 auto; for centering images.

I just have no idea where to put it in.

Offline

#7 2012-08-17 13:01:27

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Turning off Timestamp and centering images.

Like I said:

Styles go into the stylesheet, either on the styles tab, or into a file. On the artists section it’s the styles tab.

A rather global selector (addressing each image inside the content block) would be:

#content img {display: block; margin: 0 auto;}

Try whether you find a global selector satisfying, else you need to give some of the image tags a class. The rule would then read like

.your-class-name {display: block; margin: 0 auto;}

In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#8 2012-08-17 14:21:18

docutale
Member
Registered: 2012-08-03
Posts: 13

Re: Turning off Timestamp and centering images.

Im sorry but u have to remember that i dont know any css or code. I dont know what a style sheet is, maybe you have like two minutes with a skype session to help me put it in.

All i see in Styles is this code:

/* base
———————————————————————- */

body { margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif; color: #000; font-size:12px; outline:none;
}

h3 { font-size: 1em; letter-spacing:1px; font-weight:normal; font-size:18px;
}

hr { margin: 2em auto; width: 370px; height: 1px; color: #7a7e7d; background-color: #7a7e7d; border: none;
}

hr.artist_news { margin:0px; width: 200px; height: 1px; color: black; background-color: black; border: none;
margin-bottom:10px;
}

hr.blog { margin: 2em auto; width: 370px; height: 2px; color: black; background-color: black; border: none; margin-bottom:60px;
}

small, .small { font-size: 0.9em;
}

#head .cufon{
padding-top:25px;
font-size:25px;
}

#content .cufon{
font-size:20px;
}

.cufon {
padding-top:5px;
letter-spacing:1px;

}

/* links
———————————————————————- */
#head a{
color:black;
text-decoration:none;
font-weight:normal;
}

#head a:link{
color:black;
text-decoration:none;
font-weight:normal;
}

#head a:active{
color:black;
text-decoration:none;
font-weight:normal;
}

#head a:hover{
color:black;
text-decoration:none;
font-weight:normal;
}

#head a:visited{
color:black;
text-decoration:none;
font-weight:normal;
}

.older_entries a{
color:grey;
text-decoration:none;
font-weight:normal;
}

.older_entries a:link{
color:grey;
text-decoration:none;
font-weight:normal;
}

.older_entries a:active{
color:grey;
text-decoration:none;
font-weight:normal;
}

.older_entries a:hover{
color:grey;
text-decoration:underline;
font-weight:normal;
}

.older_entries a:visited{
color:grey;
font-weight:normal;
}

.newer_entries a{
color:grey;
text-decoration:none;
font-weight:normal;
}

.newer_entries a:link{
color:grey;
text-decoration:none;
font-weight:normal;
}

.newer_entries a:active{
color:grey;
text-decoration:none;
font-weight:normal;
}

.newer_entries a:hover{
color:grey;
text-decoration:underline;
font-weight:normal;
}

.newer_entries a:visited{
color:grey;
font-weight:normal;
}

#sidebar-1 a{
color:white;
text-decoration:none;
font-weight:normal;
letter-spacing:1px;
}

#sidebar-1 a:link{
color:white;
text-decoration:none;
font-weight:normal;
}

#sidebar-1 a:active{
color:white;
text-decoration:none;
font-weight:normal;
}

#sidebar-1 a:hover{
color:white;
text-decoration:none;
border-bottom:solid white 2px;
font-weight:normal;
}

#sidebar-1 a:visited{
color:white;
font-weight:normal;
}
#sidebar-2 a, #sidebar-3 a{
color:grey;
text-decoration:none;
font-weight:normal;
}

#sidebar-2 a:link, #sidebar-3 a:link{
color:grey;
text-decoration:none;
font-weight:normal;
}

#sidebar-2 a:active, #sidebar-3 a:active{
color:grey;
text-decoration:none;
font-weight:normal;
}

#sidebar-2 a:hover, #sidebar-3 a:hover{
color:grey;
text-decoration:underline;
font-weight:normal;
}

#sidebar-2 a:visited, #sidebar-3 a:visited{
color:grey;
font-weight:normal;
}

.blog_body a{
color:grey;
text-decoration:none;
font-weight:normal;
}

.blog_body a:link{
color:grey;
text-decoration:none;
font-weight:normal;
}

.blog_body a:active{
color:grey;
text-decoration:none;
font-weight:normal;
}

.blog_body a:hover{
color:grey;
text-decoration:underline;
font-weight:normal;
}

.blog_body a:visited{
color:grey;
font-weight:normal;
}

a { outline:none;
}

a img { border: none; outline:none;
}

h1 a, h2 a, h3 a { border: none;
}

h3 a { font-family: Helvetica, Arial, sans-serif;
}

#site-name a { border: none;
}

/* layout
———————————————————————- */

#accessibility { position: absolute; top: -10000px;
}

#container { margin: 0px auto; padding: 0px; width: 1050px;
}

#head { text-align: center; margin: 0 auto 30px; z-index:2000;
}

#site-name { margin: 15px 0; font-family: Helvetica, Arial, sans-serif;
}

#site-slogan { font-family: Helvetica, Arial, sans-serif;
}

#sidebar-1 {
position:fixed;
z-index:1000;
bottom:20px;
padding-top:12px;
padding-left:20px;
padding-right:20px;
background-color:black;
height:26px;
width:80%;
left:8%;
margin:0px auto;
font-size:14px;

}

#sidebar-2 {
float:left;
padding-top:40px;
padding-left:14px;
width: 235px;

}

#sidebar-3 {
float:right;
padding-top:40px;
margin-left:140px;
width: 160px;

}

.section_list { margin: 0 0 10px 0; padding: 0; list-style-type: none;
}

.section_list ul { list-style-type: none;
}

.section_list li { margin: 0 10px 2px 0; padding: 0;
}

#content { margin: 0 155px; padding-top: 30px;
}

#foot { margin-top: 5px; clear: both; text-align: center;
}

.tourdates_title {
margin: 0px auto;
width: 360px;
padding-bottom:20px;
}

.tourdates_title p{
font-size: 0.8em;
line-height: 1.5em;
}

.tourdates_body {
margin: 0px auto;
width: 360px;
text-align:left;
}

.entry-title {
margin: 0px auto;
width: 360px;
text-align:center;
padding-bottom:25px;
}

.blog_body {
padding-bottom:40px;
width:490px;
margin: 0px auto;
}

/* box model hacks
http://archivist.incutio.com/viewlist/css-discuss/48386
———————————————————————- */

#container {
\width: 1050px;
w\idth: 1050px;
}

#sidebar-1, #sidebar-2 {
}

/* overrides
———————————————————————- */

#sidebar-2 p, #sidebar-1 p, #sidebar-3 p { font-size: 0.9em; line-height: 1.5em;
}

.caps { font-size: 0.9em; letter-spacing: 0.1em;
}

div.divider { margin: 2em 0; text-align: center;
}

/* articles
———————————————————————- */

.directory { list-style-type: circle;
}

.author { font-style: normal; font-size: 0.8em;
}

.published { font-size: 0.8em;
}

/* comments
———————————————————————- */

.comments_error { color: #000;
}

ul.comments_error { padding : 0.3em; list-style-type: circle; list-style-position: inside; border: 2px solid #fdd;
}

div#cpreview { color: #000; border: 2px solid #ddd;
}

form#txpCommentInputForm td { vertical-align: top;
}

#comments-help { margin: 2px 0 15px 0; font-size: 0.7em;
}

/* error page
———————————————————————- */

.error-status { font-family: Helvetica, Arial, sans-serif;
}

Offline

#9 2012-08-17 15:04:51

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Turning off Timestamp and centering images.

I’d assume that’s the default stylesheet. At least you didn’t mention you opened a certain stylesheet.

Your section “artists” uses a stylesheet named “artists”, though. Go to Presentation > Styles, click “artists” , scroll to the very bottom of the text area, click behind the last character, press enter, and paste #content img {display: block; margin: 0 auto;} .
Click “Save”, then delete your browser’s cache and visit your site. The images should now be displayed centered.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#10 2012-08-17 15:32:14

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Turning off Timestamp and centering images.

Yes … but no ;)

You’ve two moustache parentheses at the end, i.e. you’ve not clicked behind the last character. Now, move one moustache two lines up, behind sans-serif;


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#11 2012-08-17 15:35:26

docutale
Member
Registered: 2012-08-03
Posts: 13

Re: Turning off Timestamp and centering images.

can you maybe just copy and paste how the code should look hehe?

Offline

#12 2012-08-23 11:10:08

docutale
Member
Registered: 2012-08-03
Posts: 13

Re: Turning off Timestamp and centering images.

Hey man, i’m still playing around with it, any ideas?

Offline

Board footer

Powered by FluxBB