Hi, I would like to display in my userindex.tpl a listing with images like css_listing_horizontal can do but doing it for each owner. I put the following code {css_listings_horizontal number="20" owner=$smarty.session.uid} but it doesn't work. What I am doing wrong? Thanks for your help
Is the variable for owner available to that template file? What happens if you do a specific owner like this {css_listings_horizontal number="20" owner="5"}
Hi, thank you for your reply. In fact, the result with a number is "No result found" as a number is for a particular owner.
I believe the issue here is in the syntax of your smarty call. When you are inputing an integer (number) you do not use quotes ("5"), Quotes should only be used for text inputs (type="new"). So I believe this should be like this: {css_listings_horizontal number=20 owner=5} <-- No quotes for the number inputs
I just tried this on our demo site {css_listings_horizontal number="20" owner=219} It correctly displayed 2 listings in userindex.tpl However owner 219 is a registered user and not an admin. I notice if an owner is an admin it does not display anything. Have you tried working from a registered user account rather than admin status. I will take another look and see why.
hi, Thank you for your reply. I am not sure I explain what I would like to display correctly. I would like when an owner, any owner, enter its private account, he can see like with the 68 classifieds horizontal plugin: {feature_listings_horizontal owner=$smarty.session.uid featured="N" number=15 cols=5 table_attr='style="border: 1px solid #996633; background: url(templates/default/images/anuncios_classificados.jpg) repeat; border-width: thin; padding: 2px;" align="center" width="90%" cellpadding="15" cellspacing="1"' td_attr='style="border: 1px solid #CC9966;" align="center" width="20%"' order_by='dateadded' order='desc'} the ads he has placed. Now, I would like to use the template code horizontal module to do it. So, I tried to put the following code {css_listings_horizontal owner=$smarty.session.uid featured="N"} and it displays the ads but minus one! Is there a reason for that? I suppose that with a number in place of "$smarty.session.uid" it works correctly but this is just for one particular owner and what I would like is a solution for every owner.
Is the one ad you say it doesnt display a featured ad? The reason I ask is because your saying you want to display all a user ads BUT are also specifying "featured=N".
Hi Larry, Thank you for your reply. No, "featured" was a mistake from my part. Anyway, even without that it not displays all ads. I just place a new simple ad and the plugin code from 68 classifieds works fine, there is one more ad now but the same code from templatecode plugin doesn't add any other ad. It's like it was limited to three ads!
Read my post. I tested it and it works for me. This means code has perhaps ben modified somewhere else. {css_listings_horizontal number="20" owner=$smarty.session.uid } Does this show only 3 ads? {css_listings_horizontal number="5"} It should show 5 random ads. now try this on your home page for example {css_listings_horizontal number="5" owner=$smarty.session.uid } what does it show?
Hi, thank you for answering. {css_listings_horizontal number="20" owner=$smarty.session.uid } Does this show only 3 ads? Yes {css_listings_horizontal number="5"} It should show 5 random ads: Yes, 5 random ads now try this on your home page for example {css_listings_horizontal number="5" owner=$smarty.session.uid } what does it show? Just 3 ads like in userindex.tpl
I see the problem. You need to specify like this if you use owner. {css_listings_horizontal number="5" type="random" owner=7 } Specify the type if it is random, new, featured, top etc. I just tried this on the home page of a site I run and it works. Try it with a fixed owner first and then with the owner variable. It kind of implies this if you look at the example given in the instructions for using the categoryid variable. There are so many combinations possible with this module.