1 river Jan 27, 2009 04:00
3 river Jan 29, 2009 17:23
Hello,
Thanks for responding.
No, I am not using stubs. But what I need to know is how ato call the variable $orderby. In the instructions this variable is declared but not called to do anything or connected to the stic ky field.
4 blogmeister Jan 29, 2009 21:24
Hello again.
I'm not sure what the answer is to your question as I was able to get the stub files and index.php file revised according to the instructions and they work fine. I even added the color to the sticky posts as instructed also with minor skin adaptation changes.
Once the variable was put into each of the files as instructed, it get called automatically by the script.
Wish I could have been more help to you.
5 river Jan 29, 2009 22:39
Wow
Are you saying you entered it exactly as the instructions said
$orderby = 'ptyp_ID datemodified';
without any alterations and it worked just like that? Or did you have to make some changes? As I said I am not using stub files.[/quote]
6 blogmeister Jan 29, 2009 22:46
Yes river.
I have b2evo in a subdir called 'blogs' so in 'blogs/index.php', I now have the following at the bottom of the file:
# Additionnaly, you can set other values (see URL params in the manual)...
# $order = 'ASC'; // This for example would display the blog in chronological order...
// Stickies go first
$orderby = 'ptyp_ID datecreated';
// That's it, now let b2evolution do the rest! :)
require $inc_path.'_blog_main.inc.php';
?>
This would be in each of the pertinent files calling your blogs e.g. stub files or other.
HTH.
7 river Jan 30, 2009 01:58
Thanks I will try it again and see how it goes.
Hello.
I'm just adding this feature as we speak, therefore this is my interpretation thus far...
In thread t=17036,
I take it you've added this line as you said, in /blogs_subdir/index.php unless you're not using a subdir for b2evo. You'd add it in this file IFF you're calling this file for the default blog.
That thread also says (I'm paraphrasing), if you're using stub files, for sticky posts, you must add the $orderby statement in each one that you're using. NOTE: If you are using stub files AND the default blog feature, you'd need to add it to both files for that one blog.
Here's the actual info from that thread regarding this:
The $orderby var first shows the field this feature pertains to in the database table "items__item" which would be "post_ptyp_ID." The 2nd param in $orderby is how that field will be sorted. That is why your revision of
wouldn't work.
From t=17036,
would refer to your
It would be a personal preference for whether you want to sort sticky posts based on 'datemodified' as shown in $orderby, or you could change it to 'datecreated' or even 'datestarted' I believe. (see t=17032 re: using 'datestarted')
HTH.