TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 05:36:14 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 266
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 154
  • Total: 154

Article Layouts Question... Need to Customize!

Started by rngrdanny22, September 21, 2010, 03:20:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rngrdanny22

SMF version: 2.0RC3
TP version: 1.0 bet 5.2
Theme name and version: Custom Theme - No Name
Browser Name and Version: IE8 & Firefox 3.6
Mods installed: None
Related Error messages: N/A



Hey guys, I have a question regarding the pre-made layouts for the frontpage articles. I'm talking about the first four that are selectable, not the ones that display the individual article.

I want to change the fourth one from being a four-square design to something else.

What it currently looks like:




ArticleArticle
ArticleArticle


What I want it to look like:






ArticleArticleArticleArticle
ArticleArticleArticleArticle
ArticleArticleArticleArticle
ArticleArticleArticleArticle



So, in essence, I would like it to have four columns by default instead of two. What code would need to be adjusted for this? Are these layouts located in the TPsubs file?

Thanks!

IchBin

Boy you must have a very wide screen. TBH, that would probably not fit on most peoples screens. However, this is not just a little edit. What you're asking really is a lot of work. Not something I can spend time on right now sorry.

ZarPrime

Hi rngrdanny22,

Welcome to the TP Support Site.

What you are trying to do is not possible at this time if you are working with just the Article Layout for the FrontPage.  You are limited to those 4 options.  However, theoretically, if you place each of your articles into a "Single Article" type block, and take advantage of the panel settings, you could do this but it might take a little bit of work.

For instance, let's say that you have 16 articles, and we will number them 01 to 16, and you want to show them on the FrontPage only.  If you look under the Panel settings under TPAdmin and scroll down to the Front Panel, you can "Display the blocks in 4 columns" and "Force this width on each block(use 00px or 00%):" to be 25%, each of those Single Article blocks will show up in the FrontPanel and be populated as follows ...



Article01     Article02     Article03     Article04
Article05     Article06     Article07     Article08
Article09     Article10     Article11     Article12
Article13     Article14     Article15     Article16

It also might look better if you "Force this heigth on each block(use 00px or 00%):" to a particular height as well so that the look of the blocks will be uniform.  This is pretty much going to require all of your Articles to have the same basic look so that you don't generate horizontal scroll bars in any one block.

You can get a rough idea of what this might look like by taking a look at the Forum BoardIndex on my test Forum ~ http://talesofthehavenexpanse.com/smf2test/index.php?action=forum

If you look at that page, you can see that I have setup a left panel (top block is the Welcome block) and a right panel (top block i is the User block).  Between those 2 panels, I have another User block, a shout Block, and a Stats block.  Those 3 in the middle are all in the upper panel and that panel is set to display in 3 columns and each block is set to force the width and height of each to a particular value.  This could just as well be set to 4 columns and each block could be a "Single Article" block.

In the next version of TinyPortal, bloc is working on a new feature which might make what you are trying to do somewhat easier.  Does this give you some ideas to try?

ZarPrime

Edit:  Ah, Ichbin posted while I was thinking about this.  What he has said is correct though.  Most of your members would not get a good view of what's really on your FrontPage if you splashed 4 Articles across the page like that.  The content of each Article would have to be very narrow. ;)  What you need to keep in mind is that the most popular screen resolution is still 1024 X 768.  I use 1280 X 800 and I wouldn't even want to try 4 columns, even if everybody viewing my site is using that screen resolution.

rngrdanny22

Quote from: IchBin on September 21, 2010, 04:19:10 PM
Boy you must have a very wide screen.

I've actually customized the layout of each block and thexy are only 140px wide. I manipulated the code to where only the column picture and article title are showing (the 128x128 picture you can upload for articles). The wrapper in my theme is 990px wide.


Quote from: ZarPrime on September 21, 2010, 04:42:22 PM
What you are trying to do is not possible at this time if you are working with just the Article Layout for the FrontPage.  You are limited to those 4 options.  However, theoretically, if you place each of your articles into a "Single Article" type block, and take advantage of the panel settings, you could do this but it might take a little bit of work.

The main reason I want to keep the articles showing instead of using a block is because they automatically update to show the most recent article. For my site, it would be a TON of work to update them as I will be updating the site about 5 times a day.


I'll test some stuff out as you've given me a few ideas to play with.

Thanks!

rngrdanny22

Quick question....

Would the 4 standard layouts have anything to do with the function grids() located in the TPsubs.template.php file?

Thanks!

rngrdanny22

sorry to keep blowing up this thread... LOL


The grids() is definitely where the code needs to be changed. I've corrected it to contain 4 columns, but I'm having trouble with one little piece of code.

The <div> tags in the grids() contains a snippet of code that looks like this: {featured}{col1}{col2}

Does anyone know where these are defined? Which file?

Thanks!

ZarPrime

Quote from: rngrdanny22 on September 21, 2010, 10:36:44 PM
Quick question....

Would the 4 standard layouts have anything to do with the function grids() located in the TPsubs.template.php file?

Thanks!

That's probably where the work is done but I'm not Bloc, and I don't really understand how he has written the code for this.  If a different format is what you would like, the best thing to do would be to place this into our project tracker as a feature request and see if we can get Bloc to comment on whether it would be feasible for a future version of TinyPortal or not.

If you want to do this, make sure you reference this topic so that he will know what you are talking about.  The link for our project tracker is --> http://www.tinyportal.net/index.php?project=1

ZarPrime

Lesmond

ZP not sure if members can use projects? will check though

ZarPrime

OK, I'm not sure either.  You might have to switch to curve to see all the permissions until you have fixed the issue that you and Ichbin have been working on.

ZP