TinyPortal

Development => Support => Topic started by: scip on February 26, 2005, 01:43:54 AM

Title: Link to single article
Post by: scip on February 26, 2005, 01:43:54 AM
I want to make a html block with some links to single articles (attached to -none- category). How do I do that?
And - if this is possible - would it be possible for the next version to add a "view this article" link to the article list in tpadmin? That way I could easily grab the target link for each article.

And, another question: it doesn't seem to be possible to have 2(or even more) blocks of type category. How can I have multiple blocks, each linked to different categories? If I just create another block of this type it contains just all categories as the first one.


Thanks in advance, scip
Title: Re: Link to single article
Post by: Bjørn on February 26, 2005, 07:29:33 AM
Currently the content block will alwyas be tied to actual content, but the idea of several is interesting.

"view this article" sounds great, I will test it out.
Title: Re: Link to single article
Post by: scip on February 26, 2005, 02:39:30 PM
Well, after digging through the source I found that it already works, I just have to add a link to: index.php?page=3, which then displays the page in question, wether its attached to some category or not.

The HTML Block type also has a bug (I think it's one): it replaces newlines by
. I made a menu using such a block with some special css, so this behavior destroyed the menu look. The solution was: I had to fix this in the code manually.

Also, the textarea for html block edit in admin is way too small.

And, another suggestion: for now, I created a read-only forum, in the html block mentioned, I link to this forum. What would be nice, if there were a block which can do this natively, say: put several links to some forums, it then displays on the top a list of all available topics in this forum, and when one clicks on such a link, the topic will be displayed, but like a TP page, without reply buttons and such. Would that be possible?


kind regards, scip
Title: Re: Link to single article
Post by: Bjørn on February 26, 2005, 09:59:18 PM
- The reason html block do this, is beacuse its parsed through the forum BBC system. Any "funny" code is removed then. But in this new blocktype - scriptbox - nothing is filtered, and should allow for any kind of html/css/javascript.

Of course it wont display BBC codes or smilies then.

- The size of block edit textarea has already been fixed.

- In theory yes. It would have to do some databse calls on its own and the list *could* get large, meaning some sort of sorting/limiting would have to be done.

But this is really nothing more than having the forum show topics in a specific board, with the difference of seeing topics from more than one board.

Its a sort of hybrid between messageindex and recent posts( of selected boards) and are bit too specialized to be included I think. Also, by quick estimation , it would require more than 1 call to database, and thats not so good. Already the number of calls are twice as the forum. And its that on every pageview, therefore I don't want more than whats necessary.
Title: Re: Link to single article
Post by: scip on February 26, 2005, 11:39:15 PM
Quote
- The reason html block do this, is beacuse its parsed through the forum BBC system. Any "funny" code is removed then. But in this new blocktype - scriptbox - nothing is filtered, and should allow for any kind of html/css/javascript.

You're talking about the php block type? Ok, I'll try this.

Quote- The size of block edit textarea has already been fixed.

So, there's a new version?

QuoteIts a sort of hybrid between messageindex and recent posts( of selected boards) and are bit too specialized to be included I think. Also, by quick estimation , it would require more than 1 call to database, and thats not so good. Already the number of calls are twice as the forum. And its that on every pageview, therefore I don't want more than whats necessary.

Yes, I see, actually I just linked to the forums and users can live with that, so can I. Never mind.


scip
Quote
Title: Re: Link to single article
Post by: Bjørn on February 27, 2005, 07:27:32 AM
Not the php block type, a script-type that essentially is the same as the html..but allow javascript and don't parse smileys.

The php block NEEDS the code written in php. Pure html would create errors there.

I know..the names are bit misleading, I might change them some.
Title: Re: Link to single article
Post by: scip on February 27, 2005, 10:32:50 PM
ahm, there is no such block type. All I see is html, categories and *box types.

scip
Title: Re: Link to single article
Post by: Bjørn on February 28, 2005, 01:43:26 AM
Not in the public beta, no. I am talking about the next release.