Форумы / Cotonti / General / PM image

musashi9
#1 26.09.2012 14:48

How do I get the number of new private msgs to show up on my site like it does here?

Kingsley
#2 26.09.2012 15:53
{PHP.usr.messages}

this will display the number of messages

musashi9
#3 27.09.2012 00:46

Excelent, thanks

Added 6 hours later:

Is there a way to add images to my tag results

for my Page list I added this to get the corresponding image to show

<a href="{LIST_ROW_URL}"><img src="images/{LIST_ROW_ID}.jpg">

but it doesn't work when I add it to the tags.tpl

Отредактировано: musashi9 (27.09.2012 06:31, 11 лет назад)
foxhound
#4 27.09.2012 09:31

Cause those tags are not valid tags in the tags.tpl.
To see all tags you can use in a page use this:
http://www.yourdomainname.com/index.php?e=tags&a=all&tpl_debug=1
The above link will output all tags.

To add an image I think you should do it in the css instead of what you are trying above.

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
musashi9
#5 27.09.2012 10:44

I don't want just one image, for instance my site has an image for every page I make and my 'page.list.tpl' can display each image for each page using the code I pasted above.

I need a way to get tags to do the same.

Example: I make a page and the page ID is 199 and tag it as "example1". I have an image for this page in my images folder (199.jpg)

When I click on "example1" tag it brings up all the pages I have tagged "example1". I need this page that lists all the "example1" pages to show the image for each page and not just a link, like what my 'page.list.tpl' does.

 

Twiebie
#6 27.09.2012 13:30
musashi9
#7 28.09.2012 01:29

Great plug in I wish I had this years ago before I manually uploaded files for my 1000 pages :P

However this just puts me back to square one (I could already do this with page.list)

I want to be able to do this with the TAGS plugin and the TAGS.TPL so that the tags list shows my images too.

foxhound
#8 28.09.2012 08:46

Again, that plugin (although it is great) does not work with the tags. When installed and if you check the debug page you will see no "{TAG}" are created for the "{TAGS}"available with this plugin.
I am not a php coder but I really think you will need to adapt the tags plugin to do this and can not use the available tags cause they are simply not there.

What I would try:
- open the plugins php files and search where the tag link is created. Add a "img" code to that link to a default image for example (all tags will have the same image in front of them) just for testing.
If you can get that to work it should be possible to change the img link in such a way you can actually link to a field where you add specific image names or links. Like how you know you can do it in the lists already (both by default or with this plugin).

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Отредактировано: foxhound (28.09.2012 10:05, 11 лет назад)
musashi9
#9 28.09.2012 12:08

Yeah I agree, I had a peek at the tags.list file and I think I only need the "pageID" which is stated in this file as ON r.tag_item = p.page_id

but I am not a php coder and I have no idea how to fetch this.

Trustmaster
#10 29.09.2012 18:16

{TAGS_RESULT_ROW_ID} it is.

May the Source be with you!
musashi9
#11 30.09.2012 06:36

Excelent!! it works now :D

Is there a page that lists all of these useful tags?

Trustmaster
#12 30.09.2012 07:53

Yes, foxhound has already pointed to it in this topic earlier: http://www.cotonti.com/docs/ext/themes/cotemplate_debug_mode

May the Source be with you!
musashi9
#13 30.09.2012 13:20

Great thanks