I modified the Midgard admin to display content ID's for
topics and articles.

I modified the topic page and changed the following lines:

<? function topics($root, $level) {     global $mgdright,
$mgddown, $open;     if ($t = mgd_list_topics($root)) while
($t->fetch()) { ?><img src="/images/pixel.gif" width="<?
echo $level*10; ?>" height="10" border="0" alt=""><?     if
($open && mgd_is_in_topic_tree($t->id, $open)) { ?><a
name="&(t.id);"><a href="/topic/?open=&(root);#&(t.id);"><?
echo $mgddown; ?></a> <a href="&(t.id);.html">&(t.name);
&(t.id);</a></a><br><?       topics($t->id, $level + 1);
} else { ?><a name="&(t.id);"><a
href="/topic/?open=&(t.id);#&(t.id);"><? echo $mgdright;
?></a> <a href="&(t.id);.html">&(t.name);</a></a>&nbsp;
&(t.id);<br><?     }     }     if ($root == $open && ($a =
mgd_list_topic_articles($root, "reverse score"))) while
($a->fetch()) { ?><img src="/images/pixel.gif" width="<?
echo ($level+1)*10; ?>" height="10" border="0" alt=""><a
href="/topic/article/&(a.id);.html">&(a.title); &nbsp;
&(a.name);</a>&nbsp; &(a.id);<br><?   }   } ?><? if ($t =
mgd_list_topics(0)) while ($t->fetch())     if ($open &&
mgd_is_in_topic_tree($t->id, $open)) { ?><p><a
name="&(t.id);"><a href="/topic/#&(t.id);">&(mgddown:h);</a>
<a href="/topic/&(t.id);.html">&(t.name);</a></a>&nbsp;
&(t.id);<br>   <? topics($t->id, 1); ?></p><?   } else {
?><p><a name="&(t.id);"><a href="/topic/?open=&(t.id);#&(t.id);"><?
echo $mgdright; ?></a> <a href="/topic/&(t.id);.html">&(t.name);</a></a>&nbsp;
&(t.id);</p><?   } ?><p align="right"><a
href="/topic/?action=create" class="navi">New toplevel topic
&(mgdnew:h);</a></p><br clear="all"><? } ?>

Notice the extra t.id and a.id outside of the link anchors.
This only seems to work when clicking on the triangles to
expand the list in the main content admin page.


I really have little idea what I'm doing.

However, I was not able to modifying this code correctly to
display the ID next to the Topic or Article link in the
individual Topic Admin pages:

<? if (!$action && ($t = mgd_list_topics($topic->id))) {
?><h3>Subtopics:</h3><p><? while ($t->fetch())
printf('<a href="/topic/%d.html">%s</a><br>%s', $t->id,
$t->name ? htmlentities($t->name) : ('topic #' . $t->id),
"\n"); ?></p><? } ?><? if (!$action && ($a =
mgd_list_topic_articles($topic->id, "reverse score"))) {
?><h3>Articles:</h3><p><? while ($a->fetch())
printf('<a href="/topic/article/%d.html">%s</a><br>%s',
$a->id,               $a->title ? htmlentities($a->title) :
('article #' . $a->id), "\n"); ?></p><? } ?>


Anyone have suggestions?


Todd Daniel Woodward
Technical Consultant
RadioDigest.com Inc.

http://radiodigest.com

512/583-5448 Office
512/415-6840 Cell

     "Radio you can READ!"

--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]

Reply via email to