Alright, I took the extension to fat camp and came up with a much leaner, faster, more optimized extension. The only condition is that you have to modify your ‘mod.weblog.php’ file to allow the extension hook. You can find instructions for that in the top of the .php file. Other than that pagination, limits, and any other {exp:weblog:entries /} should work now. Grab the EXT at the top of the thread.
I can’t seem to make this limit at all. I’ve tried a few different combos but it just outputs every entry in the weblog. Am I doing anything noticably wrong below?
{exp:weblog:entries weblog="homepage_top_story" test_field="one"}
{title}
{/exp:weblog:entries}
I assume if I have an input field or drop down field (one or the other) that has “one” in it, that all those entries will show up but those without that text will not. I would use this right now if it worked for me.
Any help is appreciated. Thanks!
You’ll want to make sure you update your weblog files as described here: http://ellislab.com/forums/viewthread/38371/P18/#187855 and in the top of the extension. Have you done that?
The only condition is that you have to modify your ‘mod.weblog.php’ file to allow the extension hook. You can find instructions for that in the top of the .php file.
Hi. I’m trying to get this extension to work. I’m encountering the same problem that Rob Q was encountering, and I’m 99% certain the reason is that I haven’t modified the mod.weblog.php file. But I can’t for the life of me find the instructions for doing that in the top of the .php file.
Can someone point me in the right direction?
Thanks, Frank
If you open the extension in an HTML editor it has this instruction for modifying the mod.weblog.php file which itself is found in System > Modules > mod.weblog.php.
So in mod.weblog.php search for
($this->paginate == TRUE)
– I believe there is more than one instance but it should be around line 2137
FIND THIS:
// ----------------------------------------
// Do we need pagination?
// ----------------------------------------
// We'll run the query to find out
if ($this->paginate == TRUE)
INSERT THIS RIGHT BEFORE THAT LINE:
// -------------------------------------------
// 'build_sql_query' hook.
// - Rewrite, or add to the sql query
//
global $EXT;
if (isset($EXT->extensions['build_sql_query']))
{
$sql = $EXT->call_extension('build_sql_query', $sql, $this);
if ($EXT->end_script === TRUE) return;
}
//
// -------------------------------------------
Mark -
What a great extension - especially for those of us with little query knowledge. Thank you!!
I just ran into a situation where I need to include two different conditions like this:
{exp:weblog:entries weblog="events" show_future_entries="yes" limit="3" sort="asc" efront="=Yes" esloc="Delaware|Virginia"}
<h2>title</h2>
{body}
{/exp:weblog:entries}
But as I quickly found out - it does not work.
Can I have two conditions (notice the last two conditions: efront and esloc), but then look closer at esloc - I tried to include two different settings. Is this possible? If not I would love to add this as a feature request.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.