|
From: shane <sh...@lo...> - 2003-10-11 11:39:24
|
On Friday 10 October 2003 21:48, Ralph Dratman wrote:
>[...]
>My compliments to the team for
> making it amazingly easy to get started
>[...]
Glad it went well for ya. It's funny how I rarely see people saying this.
Because if you've got the correct perl stuff installed (I guess I should say
the requrements installed and setup) Slash'll install easily, which in a way
is dumbfounding, you'd think it woudln't be this easy.
>[...]
> I just want to move the "Read More" link. Instead of having the user
> click on a text link,
>
> (Read More... | 10 of 22 comments)
>
> I would prefer an icon right in the body of the story.
>
> The templates involved are 121, 169, and 88. (Aside: where do the
> numbers come from?)
Don't refer to templates via the #'s. The numbers are different for every
installation - they are from the auto_increment field.
Refer to them by name;page;section
ie
mysql> select tpid,name,page,section from templates where tpid=121 or tpid=169
or tpid=88;
+------+-----------+---------+---------+
| tpid | name | page | section |
+------+-----------+---------+---------+
| 88 | subEdUser | submit | default |
| 121 | list | faqster | default |
| 169 | calculate | stats | default |
+------+-----------+---------+---------+
3 rows in set (0.00 sec)
so you'd want to say subEdUser;submit;default because you may also have in
your db (depending on what theme you chose when you installed your site)
subEdUser;submit;light , etc etc.
> The "Read More" link is generated in template 169 by
>
> [% links.join(' | ') %]
>
> and I understand that the vertical bar is being specified as a
> separator between the generated links. Yet I can't seem to get any
> deeper than this to find the code for a simple link to the story page.
> I tried to follow the call to links.join by grepping for "sub links"
> in the templates directory, but did not find anything. Is it a method
> call? I do see
>
> links = arrayref of links
>
> but that does not illuminate anything for me right now.
snippets from slash/themes/slashshcode/htdocs/index.pl
while ($story = shift @$stories) {
my($tmpreturn, $other, @links);
push @links, linkStory({
'link' => $msg->{readmore},
sid => $story->{sid},
tid => $story->{tid},
section => $story->{section}
}, "", $ls_other);
So it's the template linkStory\;misc\;default that you need to look at first
off.
Then at the end of index.pl it's calling
storylink\;index\;default
that has in it:
[% FOREACH storylinks = links; IF storylinks.ref == 'ARRAY' %]
<A HREF="[% storylinks.0 | strip_attribute %]"[% IF storylinks.2 %] TI
TLE="[% storylinks.2 | strip_attribute %]"[% END %]>[% storylinks.1 %]
</A>
[% ELSE; storylinks; END %]
[% UNLESS loop.last %] | [% END %]
[% END %]
So I think you'll want to become familiar with those two templates.
> I know I will figure this out eventually but I'm wimping out and
> asking for help. I do intend to learn my way around the system and I
> just want a little hint.
Nah. There's tons of people wondering how to do the same thing.
They just never send anything to the list. Excellent question.
> If I've missed some relevant and maybe obvious piece of
> documentation, let me know and I will go away and happily study it. I
> bought the O'Reilly Slash book and it's been quite useful.
Nah, good job. The best part is that you started grepping for it. Many times
that is the *easiest* way to find something.
Shane
|