Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages

www.blogsome.com Forum Index » Questions and Comments

Post new topic   Reply to topic
previous page / next page?
View previous topic :: View next topic  
Author Message
Itsuki



Joined: 09 Dec 2004
Posts: 22

PostPosted: Fri Dec 10, 2004 7:20 pm    Post subject: previous page / next page? Reply with quote

Hi! I tried inserting the <?php posts_nav_link(); ?> tag just after the {$content} but nothing shows up. Do you guys have an idea on how to enable paging in my blog? Thanks!

In addition, the WP Wiki says this tag should go after the loop but I couldn't find the loop in my main and post templates.

Is it possibly because the main page is in html and not in php?
Back to top
View user's profile Send private message Visit poster's website
diskawa



Joined: 13 Dec 2004
Posts: 22

PostPosted: Tue Dec 14, 2004 1:39 am    Post subject: Re: previous page / next page? Reply with quote

Itsuki wrote:
Hi! I tried inserting the <?php posts_nav_link(); ?> tag just after the {$content} but nothing shows up. Do you guys have an idea on how to enable paging in my blog? Thanks!

In addition, the WP Wiki says this tag should go after the loop but I couldn't find the loop in my main and post templates.

Is it possibly because the main page is in html and not in php?


try;

Code:
{posts_nav_link separator=',' previous='<<' next='>>'}


The WP Wiki normaly shows the PHP scripts, and that is most of the time for those who use WP on their own hosts etc..
Im not 100% certain, but it seems that you should use; { & } for opening and closing, and not the standard php ones; <?php

Maybe someone else can clearify this who has more knowledge of WP and Blogsome.com
Back to top
View user's profile Send private message
Itsuki



Joined: 09 Dec 2004
Posts: 22

PostPosted: Tue Dec 14, 2004 2:31 am    Post subject: Reply with quote

Thank you so much! That worked for me Razz
Back to top
View user's profile Send private message Visit poster's website
zheaton



Joined: 03 Dec 2004
Posts: 532
Location: United States

PostPosted: Tue Dec 14, 2004 5:29 am    Post subject: Follow-up Question Reply with quote

Well, this leads to a more general question: Is there any way to call PHP code from within Blogsome? I'm playing with building an header image rotator right now (randomly selecting a item from a hand-defined array of image urls - very simple and low-overhead), but if there's no way to call PHP code from within BlogSome, then I can pitch that code without further delay.

Is there any chance that we can get a definitive answer from the admins on this? The ability to embed raw PHP code would be extremely handy for advanced template building.

Regards,
zheaton
_________________
I'm no longer a moderator - don't PM me with questions.

Search the forum, check the wiki, and ask smart questions
Back to top
View user's profile Send private message Visit poster's website
diskawa



Joined: 13 Dec 2004
Posts: 22

PostPosted: Tue Dec 14, 2004 5:40 am    Post subject: Re: Follow-up Question Reply with quote

zheaton wrote:
Well, this leads to a more general question: Is there any way to call PHP code from within Blogsome? I'm playing with building an header image rotator right now (randomly selecting a item from a hand-defined array of image urls - very simple and low-overhead), but if there's no way to call PHP code from within BlogSome, then I can pitch that code without further delay.

Is there any chance that we can get a definitive answer from the admins on this? The ability to embed raw PHP code would be extremely handy for advanced template building.

Regards,
zheaton


Yes, this would be interesting to know actually. Just find it interesting that the Index file is named index.html instead of .php?
Maybe they built it this way are open to suggestions for improvement...
Would be great though to be able to add includes for example...

*thread hijacking* Wink
Back to top
View user's profile Send private message
john
Guest





PostPosted: Tue Dec 14, 2004 10:15 am    Post subject: Reply with quote

At the moment we have no plans to support users writing their own php pages, mostly for security reasons i'm afraid. Your "html" pages are smarty templates which allow quite a lot of freedom and allow you to do an awful lot of things.

However.

If you have a good idea for something more advanced and can provide it as a plugin that other users might want to use, we would certainly look at including it in our default set of plugins.

John
Back to top
zheaton



Joined: 03 Dec 2004
Posts: 532
Location: United States

PostPosted: Tue Dec 14, 2004 1:50 pm    Post subject: Reply with quote

That's sort of the response I was expecting - time for me to look over smarty formatting rules and the steps for creating plugins. Thanks for the quick response!

Regards,
zheaton
_________________
I'm no longer a moderator - don't PM me with questions.

Search the forum, check the wiki, and ask smart questions
Back to top
View user's profile Send private message Visit poster's website
XiangWei
Guest





PostPosted: Fri Jul 08, 2005 10:05 am    Post subject: Reply with quote

diskawa said:
Quote:

try;

Code:
{posts_nav_link separator=',' previous='<<' next='>>'}


I've tried to post it under {$content} on my template (index.html), but didn't work for me.

Do we need to add something to display it?

I am so confused. Have also tried to search other posts, but doesn't find the answer.

Please help..

Thanks..
Back to top
DrunkenLagomorph



Joined: 01 Jul 2005
Posts: 11
Location: Denver, Colorado

PostPosted: Fri Jul 08, 2005 4:56 pm    Post subject: Reply with quote

Here's how I did it (thanks to whoever answered this question in a previous thread Very Happy )

In the code of your main page, look for:

Code:
<div id="content">
{$content}
</div>


Add this code:
Code:

{previous_posts_link label="Newer Posts"}
{next_posts_link label="Older Posts"}


You can change the text in between the quotes to whatever you want.

Your code should look something like this when you're done:
Quote:

<div id="content">
{$content}
{previous_posts_link label="Newer Posts"}
{next_posts_link label="Older Posts"}
</div>
Back to top
View user's profile Send private message Visit poster's website
XiangWei
Guest





PostPosted: Wed Jul 13, 2005 5:33 am    Post subject: Reply with quote

Thanks Drunken,

But it still doesn't work!

I don't know what is wrong...

I see you also don't put tags in your blog? Could you pls try to insert it? I wonder if it works for you but doesn't work for me.

Thanks.
Back to top
zheaton



Joined: 03 Dec 2004
Posts: 532
Location: United States

PostPosted: Thu Jul 14, 2005 1:55 am    Post subject: Reply with quote

XiangWei, can you post the code that isn't working for you?
_________________
I'm no longer a moderator - don't PM me with questions.

Search the forum, check the wiki, and ask smart questions
Back to top
View user's profile Send private message Visit poster's website
XiangWei
Guest





PostPosted: Sat Jul 16, 2005 5:07 am    Post subject: Reply with quote

Zheaton,

I made my 'main page' template looked like this:

Code:
<div id="content">
{$content}
{previous_posts_link label="Newer Posts"}
{next_posts_link label="Older Posts"}
</div>


but my blog didn't show any previous or next link.
Back to top
ching
Guest





PostPosted: Sun Jul 17, 2005 5:17 pm    Post subject: Reply with quote

XiangWei,

the next and previous code should look like this:

Code:

<div id="content">
{$content}[color=red]
{posts_nav_link separator=',' previous='<<' next='>>'}[/color]
</div>



cheers,
ching
Back to top
Guest






PostPosted: Sun Jul 17, 2005 5:24 pm    Post subject: Reply with quote

ching wrote:
XiangWei,

the next and previous code should look like this:

Code:

<div id="content">
{$content}[color=red]
{posts_nav_link separator=',' previous='<<' next='>>'}[/color]
</div>



cheers,
ching


i am sorry, it should be

Code:

<div id="content">
{$content}
{posts_nav_link separator=',' previous='<<' next='>>'}
</div>


hope it works. Wink

ching
Back to top
Display posts from previous:   
Post new topic   Reply to topic    www.blogsome.com Forum Index » Questions and Comments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum