TinyPortal

Development => Support => Topic started by: clintw on March 12, 2009, 05:10:54 PM

Title: Articles: About the author and Printing article with php
Post by: clintw on March 12, 2009, 05:10:54 PM
Link to my site: Not a live site (Xamp,WINXP)
SMF version: SMF 1.1.8
TP version: TP v1.0 beta 3
Theme name and version: SMF Default Theme - Core
Mods installed: YouTube BBCode 1.7
Related Error messages:

Experiencing two problems on Frontpage,
Problem 1:
In an Article, you can show the blurb "About the author", with the date of registration and number of posts. Initially I'm sure this did show all the information, but suddenly this no longer appears. It just reads:
"John registered at XYZ Forum on and has posted posts in the boards since then. Last visit was ."
What might I have done, that would cause this to stop showing details?

Problem 2:
When you create an article, and select PHP Code and enter something silly like echo'ing current date, this displays correctly. But as soon as you click on "Print Article" instead of getting the generated output of the php code, the page displays the actual php code.

Sorry in advance if this turns out to be something for the SMF forum.

Title: Re: Articles: About the author and Printing article with php
Post by: JPDeni on March 12, 2009, 05:26:13 PM
QuoteProblem 1:
In an Article, you can show the blurb "About the author", with the date of registration and number of posts. Initially I'm sure this did show all the information, but suddenly this no longer appears. It just reads:
"John registered at XYZ Forum on and has posted posts in the boards since then. Last visit was ."
What might I have done, that would cause this to stop showing details?

I have never seen that. I'm running TP .98 on my site and, while there is an intro text available, I don't see anything like an "About the author" blurb. I don't even know where you get "John registered at XYZ Forum on ... " The only thing I've ever seen is the ability to put in the author's name.

Quote
Problem 2:
When you create an article, and select PHP Code and enter something silly like echo'ing current date, this displays correctly. But as soon as you click on "Print Article" instead of getting the generated output of the php code, the page displays the actual php code.

That's because it prints directly from the database and not the page. A way around that would be to have people print from their browsers rather than using the Print Article function in TP.

Carol
Title: Re: Articles: About the author and Printing article with php
Post by: clintw on March 12, 2009, 06:12:50 PM
Thanks for the reply

John is the author name I'm signed under. Under Article, I select "Display author avatar/info" and this gives the blurb I mentioned, but without the dates and stats. I chose the option not to use an Intro. Its really odd, since it did output the registration date and number of posts and last visit date, after I installed TP.

As for the php code inclusion, disabling printing, disables it for all articles. Theres no option to disable printing on a per Article basis. Printing from browser, this is not really an elegant solution - but hey thats just me.

Title: Re: Articles: About the author and Printing article with php
Post by: JPDeni on March 12, 2009, 06:59:03 PM
I have never seen "Display author avatar/info" until now. I was looking at "Details". It appears not to show anything at all on php articles, which is what I have use.

I'll let Bloc address the problem with php articles and printing. Maybe he knows of some way that the php can be evaluated before the printing, but I have a feeling that it would mean completely changing the way things are printed.
Title: Re: Articles: About the author and Printing article with php
Post by: clintw on March 12, 2009, 07:12:42 PM
Thanks. I'll dig around some more. Maybe try and retrace what I might have changed that made it stop working, wrt the 'About the author'.
Title: Re: Articles: About the author and Printing article with php
Post by: bloc on March 13, 2009, 12:24:34 PM
The no-printing of PHP was actually a bug, it should render the PHP code as well. In beta 4 this is corrected.
Title: Re: Articles: About the author and Printing article with php
Post by: JPDeni on March 13, 2009, 01:47:42 PM
Cool that this will work for folks now, Bloc!

clintw, wrt your "about the author" thing, I did some experimenting yesterday and I found that there has to be an avatar associated with the author in order to get the blurb. Maybe there isn't one in the case you're looking at.