Here is the best guidance I can figure out quicky. (I don’t know why the syntax highlighting engine doesn’t the comments at the end)
Find this (about line 2375):
/** ----------------------------------------
/** Do we need pagination?
/** ----------------------------------------*/
// We'll run the query to find out
if ($this->paginate == TRUE)
INSERT THIS RIGHT [b]BEFORE[/b] 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;
}
//
// -------------------------------------------
FIND THIS (about line 500):
$sql = "SELECT rel_id, rel_parent_id, rel_child_id, rel_type, reverse_rel_data
FROM exp_relationships
WHERE rel_child_id IN ('".implode("','", array_keys($this->reverse_related_entries))."')
AND rel_type = 'blog'";
INSERT THIS RIGHT AFTER THAT LINE:
// -------------------------------------------
// 'build_reverse_sql_query' hook.
// - Rewrite, or add to the sql query
//
global $EXT;
if (isset($EXT->extensions['build_reverse_sql_query']))
{
$sql = $EXT->call_extension('build_reverse_sql_query', $sql, $this);
if ($EXT->end_script === TRUE) return;
}
//
// -------------------------------------------
The second one seems to actually be first in mod.weblog.php now unless I stuck something in the wrong place (very possible). I hope this helps. Finally, may I suggest that we start up a custom entries extension cookbook page on the wiki? People could put their example queries up there, as there seems to be quite a bit of confusion as to how to effectively use this extension. It seems like more examples would help.
I am just trying this extension for my old EE 1.5 site. After checking out this thread a bit, it works fine now. IT’s GREAT.
But I discovered that when I change a field in the weblog to a “RELATIONSHIP” field, it returns no records. I am sure that I only change a field to “RELATIONSHIP” before that it’s working and returning what I want.
Can anyone help ? Or how can I deal with a relationship field where I want to display a value according to the current weblog field ?
Roger.
Hmmm, I can’t see the difference!
Actually, I had this extension working fine for other things, but It all stopped working after I upgraded to 1.6… …oh - haha, had to re-do mod.weblog.php now works again, but I still can’t achieve the results described above. I would try your updated suggestion Bob, but I can’t tell the difference between the two 😊
either I’m going a bit off my rocker or the forum has been turning my brackets around. Here’s trying again. custom_field_name=”>”
update: Yes I think I found a forum bug, it is turning my greater than into a less than on output. let’s try it in code form:
custom_field_name=">"
Seems to be ok when wrapped in code.
I have just upgraded to 1.6, and this extension no longer seems to work. Has anyone else experienced this or know a workaround? Thanks
I was having the same problem… had to disable the extension, add the code to the upgraded mod.weblog.php, upload the new version of CUSTOM FIELDS IN TAGS, and reenable. It didn’t work until I tried the enable/disable routine.
Great extension!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.