TinyPortal

Development => Support => Topic started by: hartiberlin on July 28, 2007, 04:05:34 AM

Title: Front page blocs first and then recent postings on front page ?
Post by: hartiberlin on July 28, 2007, 04:05:34 AM
Hi,
how can I have
Front page blocs first and then the last recent postings from the forum
on front page ?

In the admin setup I see only "front blocs and then articles",
but not "front blocs and then postings".

Or can I somehow put automatically the last postings into articles?

Many thanks.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: baller1308 on July 28, 2007, 09:04:49 AM
yeah, I'm trying to figure out the same thing.  I'd like to be able to view the recent posts block on the home page, but not on any other page.  I figured out how to do it on every single other page except for the Home page :(.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: wilsy on July 28, 2007, 11:30:44 AM
Hi,

Look here http://www.tinyportal.net/index.php?topic=596.0 and put the code in a front page block.

Regards,

Wilsy.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: IchBin on July 28, 2007, 04:37:53 PM
Unfortunately we could never implement ALL the ways that people want to do things.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: hartiberlin on July 28, 2007, 06:57:40 PM
Quote from: wilsy on July 28, 2007, 11:30:44 AM
Hi,

Look here http://www.tinyportal.net/index.php?topic=596.0 and put the code in a front page block.

Regards,

Wilsy.

Well, this above example only
displays the recent topics with their subjects only...

I really want now the last 50 postings from my forum with the first 100 words
like  articles under my own frontpage blocs.

Can I somehow import the last 50 postings automatically into articles ?
Or how do articles work or how could I do it more easily ?

I would also like to use Google Adsense code to put an Adsense banner
between each 10 last postings there.
Could I use the latest Admod V2.3 for this or do I have to integrate the Adsense code
myself manually for this ?
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: IchBin on July 28, 2007, 07:08:01 PM
You can't import anything automatically into articles without some major coding going on. You'll have to a code snippet that will grab the latest 50 posts that includes the body of the subject. I'm pretty sure that the ones in the code snippets board could do this, if they haven't already.

Any mods if they don't install will have to be installed manually. And for any theme other than the default you will have to manually install the mod to the theme.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: hartiberlin on July 28, 2007, 07:31:14 PM
Hmm,
is there no easy solution to use the A style frontpage
and first have my own 2 frontpage blocs
and then the
lastest 50 postings with the first 100 words of them ?
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: IchBin on July 28, 2007, 08:03:21 PM
Sure, you use frontpage blocks only on your frontpage. Put your info in the 2 first blocks. In the third block you put the recentposts code that I was referring to.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: hartiberlin on July 28, 2007, 08:28:12 PM
Hmm,
I just did now put my first 2 frontpage bloc into the frontpage style A
and then added a 3rd frontpage block
as a recent posting bloc and gave the last 200 postings,
but it only shows the last 40 ... hmmm
also the formating is not good and it shows only
the subject title and nothing from the posting itsself.

Did you mean this thread:
http://www.tinyportal.net/index.php?topic=596.0

??

Uff,
31 pages to read and study..
No easier solution ?

Please have a look at:

http://www.overunity.com
and let me know, which code you would suggest to use.
Many thanks.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: Ray on July 28, 2007, 09:35:10 PM
hartiberlin,
take a look at my front page  http://www.arcade-only.com  and see if you like the recent post code I use. if you do here it is

// "Recent Topics" a php Block
// Prefered settings when being designed
// Border and title on
// Title ="Recent Topics"

global $scripturl;
$what=ssi_recentTopics('10', NULL, 'array');

echo '<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">';
echo '<tr class="catbg3"><td valign="middle">Subject</td><td valign="middle">Board</td><td valign="middle">Poster</td><td valign="middle">Time</td></tr>';

foreach ($what as $topic)
  {
    echo '<tr><td class="windowbg" valign="middle">', $topic['link'];
    // Is this topic new? (assuming they are logged in!)
    if (!$topic['new'] && $context['user']['is_logged'])
      echo '<a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['time'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
      echo '</td><td class="windowbg2" valign="middle" >', $topic['board']['link'], '</td>';
      echo '</td><td class="windowbg2" valign="middle" >', $topic['poster']['link'], '</td><td class="windowbg2" valign="middle" >';
      if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
      echo '<a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
      echo '<span class="smalltext">', $topic['time'], '</span></td></tr>';
  }

echo '</table>';
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: IchBin on July 28, 2007, 09:56:28 PM
Ray, he's looking for something with the body of the subject displayed as well. I guess I'll have to search for him.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: IchBin on July 28, 2007, 10:12:21 PM
You should take a look at this and see if its what you're looking for.

http://www.tinyportal.net/index.php?topic=596.msg32343#msg32343
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: baller1308 on July 28, 2007, 10:33:17 PM
Quote from: IchBinâ„¢ on July 28, 2007, 08:03:21 PM
Sure, you use frontpage blocks only on your frontpage. Put your info in the 2 first blocks. In the third block you put the recentposts code that I was referring to.
This is actually what I want, maybe not the OP.  I'd like the right side recent posts block to show up on the home/frontpage only, not the forums.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: hartiberlin on July 29, 2007, 03:29:19 AM
Quote from: IchBin™ on July 28, 2007, 09:56:28 PM
Ray, he's looking for something with the body of the subject displayed as well. I guess I'll have to search for him.

Actually,
I am looking for more like this, asif I klick this link with the recent postings:


But this should come automatically inside a bloc on the front page
and also INCLUSIVE the posted ATTACHMENTS,
which the recent link:


does  unfortunately not show.


Regards, Stefan.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: IchBin on July 29, 2007, 04:12:32 AM
You're asking for more than I can provide at the moment. Perhaps you should post in the requests board in the block code snippets section. Especially if you're asking for attachments. You would actually probably be better off asking at SMF for this custom code. I'm removing your links to so no kids or anything see the porn on your page.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: hartiberlin on July 29, 2007, 04:35:08 AM
???
Which porn ?
I donÃ,´t have any porn on my site...
Please explain...

Edit:
I just saw, that somebody posted a porn spam to my forum
and I have now removed it and banned the user...

now look again
at
www.overunity.com

Thanks.

Title: Re: Front page blocs first and then recent postings on front page ?
Post by: hartiberlin on July 29, 2007, 04:38:22 AM
Quote from: Ray on July 28, 2007, 09:35:10 PM
hartiberlin,
take a look at my front page  http://www.arcade-only.com  and see if you like the recent post code I use. if you do here it is

// "Recent Topics" a php Block
// Prefered settings when being designed
// Border and title on
// Title ="Recent Topics"

global $scripturl;
$what=ssi_recentTopics('10', NULL, 'array');

echo '<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">';
echo '<tr class="catbg3"><td valign="middle">Subject</td><td valign="middle">Board</td><td valign="middle">Poster</td><td valign="middle">Time</td></tr>';

foreach ($what as $topic)
  {
    echo '<tr><td class="windowbg" valign="middle">', $topic['link'];
    // Is this topic new? (assuming they are logged in!)
    if (!$topic['new'] && $context['user']['is_logged'])
      echo '<a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['time'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
      echo '</td><td class="windowbg2" valign="middle" >', $topic['board']['link'], '</td>';
      echo '</td><td class="windowbg2" valign="middle" >', $topic['poster']['link'], '</td><td class="windowbg2" valign="middle" >';
      if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
      echo '<a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
      echo '<span class="smalltext">', $topic['time'], '</span></td></tr>';
  }

echo '</table>';



Ray,
many thanks,
I tried to use this now temporarly ,but I can only get it to show the latest 40 postings,
no more.

Where can I set this higher ?

When I set:

$what=ssi_recentTopics('200', NULL, 'array');


for the last 200 messages, it only displays 40 messages...
hmm..
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: baller1308 on July 30, 2007, 05:11:46 AM
Actually, I was looking for something like this:

http://www.judeanpeoplesfront.net/forum/index.php

Where recent posts shows up on the Home site, but not on the forums.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: IchBin on July 30, 2007, 05:23:02 AM
Thats what frontpage blocks are for.
Title: Re: Front page blocs first and then recent postings on front page ?
Post by: baller1308 on July 30, 2007, 05:38:41 AM
Quote from: IchBinâ„¢ on July 30, 2007, 05:23:02 AM
Thats what frontpage blocks are for.
but it's showing under my articles, rather then on the left or right of the articles.