Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Help Needed : Article Display - 2
Greetings All,
I’m quite new to using textpattern as a CMS. As such, I’m currently testing TXP offline via apache triad, whilst trying to develop my custom theme for the install. As such, I’m having trouble coming up with suitable TXP ‘forms’ for the HTML posted below.
Your advise, assistance, and input will be highly appreciated.
<!— Start Detailed Article Display —>
<div class=“post”>
<h2>Aliquam euismod dolor in hendrerit in vulputate</h2>
<!— Start Article Credits —> <small>By <a href=”#” title=“Posts by Author”>Author Name</a> • Dec 31, 2008 • Category: <a href=”#” title=“View all posts in Category” >Category Name</a></small> <!— End Article Credits —>
<!— Start Article Display —>
<div class=“entry”>
<p><img src=“images/article_image.jpg” alt=“Article Image” class=“picleft”>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
<!— End Article Display —>
<span id=“tags”> <strong>Categories:</strong> <a href=”#” rel=“tag”>cat 1</a>, <a href=”#” rel=“tag”>cat 2</a>, <a href=”#” rel=“tag”>cat 3</a> </span>
<!— Start Writer Credits —>
<div id=“writer” class=“clearfloat”>
<img src=“images/author.jpg” alt=“Avatar for the Author”>
<p class=“right”>
<strong><a href=”#” title=“Posts by Author”>Author Name</a></strong> lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc purus velit, faucibus ut, adipiscing id, feugiat at, mi. Curabitur eu nibh laoreet neque interdum nonummy.<br>
<span>
<a href=“mailto:email@email.com” title=“Email this author”>Email this author</a> | All posts by <a href=”#” title=“Posts by Darren”>Author Name</a>
</span>
</p>
</div>
<!— End Writer Credits —>
</div>
<!— End Detailed Article Post —>
Que,
Que-Multimedia
Offline
Re: Help Needed : Article Display - 2
The code [ Properly Formatted ]:
<code>
<!— Start Detailed Article Display —>
<div class=“post”>
<h2>Aliquam euismod dolor in hendrerit in vulputate</h2>
<!— Start Article Credits —> <small>By <a href=”#” title=“Posts by Author”>Author Name</a> • Dec 31, 2008 • Category: <a href=”#” title=“View all posts in Category” >Category Name</a></small>
<!— End Article Credits —>
<!— Start Article Display —>
<div class=“entry”>
<p><img src=“images/article_image.jpg” alt=“Article Image” class=“picleft”>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
<!— End Article Display —>
<span id=“tags”> <strong>Categories:</strong> <a href=”#” rel=“tag”>cat 1</a>, <a href=”#” rel=“tag”>cat 2</a>, <a href=”#” rel=“tag”>cat 3</a>
</span>
<!— Start Writer Credits —>
<div id=“writer” class=“clearfloat”>
<img src=“images/author.jpg” alt=“Avatar for the Author”>
<p class=“right”> <strong><a href=”#” title=“Posts by Author”>Author Name</a></strong> lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc purus velit, faucibus ut, adipiscing id, feugiat at, mi. Curabitur eu nibh laoreet neque interdum nonummy.<br> <span> <a href=“mailto:email@email.com” title=“Email this author”>Email this author</a> | All posts by <a href=”#” title=“Posts by Darren”>Author Name</a>
</span>
</p>
</div>
<!— End Writer Credits —>
</div>
<!— End Detailed Article Post —>
</code>
Que,
Que-Multimedia
Offline
#3 2008-12-31 15:55:37
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Help Needed : Article Display - 2
Offline
Re: Help Needed : Article Display - 2
Thanks a great deal. How can I achieve the above custom out put for the article?
Que,
Que-Multimedia
Offline
Re: Help Needed : Article Display - 2
Hi Gue
As per Els advise, it will be much easier to get the help you need if you edit your posts above to show the code properly.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Help Needed : Article Display - 2
Hi Colak
I think this is better….
<code>
<!— Start Detailed Article Display —>
<div class=“post”> <h2>Aliquam euismod dolor in hendrerit in vulputate</h2> <!— Start Article Credits —> <small>By <a href=”#” title=“Posts by Author”>Author Name</a> • Dec 31, 2008 • Category: <a href=”#” title=“View all posts in Category” >Category Name</a></small>
<!— End Article Credits —>
<!— Start Article Display —>
<div class=“entry”>
<p><img src=“images/article_image.jpg” alt=“Article Image” class=“picleft”>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
<!— End Article Display —> <span id=“tags”> <strong>Categories:</strong> <a href=”#” rel=“tag”>cat 1</a>, <a href=”#” rel=“tag”>cat 2</a>, <a href=”#” rel=“tag”>cat 3</a>
</span>
<!— Start Writer Credits —>
<div id=“writer” class=“clearfloat”>
<img src=“images/author.jpg” alt=“Avatar for the Author”>
<p class=“right”> <strong><a href=”#” title=“Posts by Author”>Author Name</a></strong> lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc purus velit, faucibus ut, adipiscing id, feugiat at, mi. Curabitur eu nibh laoreet neque interdum nonummy.<br> <span> <a href=“mailto:email@email.com” title=“Email this author”>Email this author</a> | All posts by <a href=”#” title=“Posts by Darren”>Author Name</a>
</span> </p>
</div>
<!— End Writer Credits —>
</div>
<!— End Detailed Article Post —>
</code>
Que,
Que-Multimedia
Offline
Re: Help Needed : Article Display - 2
Guys,
So far, I’ve managed to come up with the following code. Part of it works, however, still stuck with trying to show ‘Author Avatar’, and ‘Email Link’.
Any ideas out there? Any simpler way to get the same layout/ format?
<!— Start Detailed Article Display —>
<div class=“post”>
<h2><txp:title /></h2>
<!— Start Article Credits —>
<small>
By <txp:author link="1" /> •
<txp:posted format="%b %d, %Y" /> •
Category: <txp:category1 link="1" title="1" />
</small>
<!— End Article Credits —>
<!— Start Article Display —>
<div class=“post”>
<txp:article_image class=“picleft” />
<txp:body />
</div>
<!— End Article Display —>
<span id=“tags”>
<strong>Categories:</strong>
<txp:category1 link="1" title="1" /> |
<txp:category2 link="1" title="1" />
</span>
<!— Start Writer Credits —>
<div id=“writer” class=“clearfloat”>
<img src=“images/author.jpg” alt=“Avatar for the Author”>
<div class=“right”>
<strong>
<txp:author link="1" />
</strong>
<span>
<a href=“mailto:email@email.com” title=“Email this author”>Email this author</a> |
All posts by <txp:author link="1" />
</span>
</div>
</div>
<!— End Writer Credits —>
</div>
<!— End Detailed Article Post —>
Que,
Que-Multimedia
Offline
Re: Help Needed : Article Display - 2
You’ll be needing a plugin for the avatar, maybe GlxGravatar will might be of help.
Last edited by colak (2009-01-05 17:36:25)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
Re: Help Needed : Article Display - 2
jstubbs wrote:
Think cbs_gravatar might be a better bet.
I’m curious what makes cbs_gravatar better? From the little documentation available without installing either it looks like glx_gravatar has the option of displaying the article author’s gravatar using
<txp:glx_gravatar><txp:gho_author_email/></txp:glx_gravatar>
Edit: Couldn’t find gho_author_email so a better example might be
<txp:glx_gravatar><txp:php>global $thisarticle; echo safe_field("email","txp_users","name='".$thisarticle['authorid']."'");</txp:php></txp:glx_gravatar>
Last edited by MattD (2009-01-05 21:13:58)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Help Needed : Article Display - 2
I swore by glx_gravatar for a few years but I do remember it was a bit hit and miss to set up. However, when the cache thing worked, it worked very well and was the best part about the plugin. I’ve not tried cbs_gravatar; the lack of cache makes it simpler but, well, it’s Christophe so it’ll be rock solid whereas glx_gravatar is much older and somewhat flakier. I dunno, up to you really.
The biggest bugbear I have with gravatar.com (and partly the reason I despise things like Google Analytics) is because reliance on those things always slows page loading times. As if the server hasn’t got enough to do with JS libraries and CSS files and stuff it has to wander off to saturated 3rd party sites and wait for a slot. Cache please!
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Help Needed : Article Display - 2
Thanks guys,
Trying this out right away….
Will post feedback.
Que,
Que-Multimedia
Offline