V4.1.x Custom Category Templates Mod Problem

Discussion in 'Modules / Plugins / Modifications' started by rockabilly, Jun 14, 2009.

  1. MrGForce Customer

    Good News Larry.

    Your code works. The problem seems to have been two-fold. First, I believe the "Custom Category" Module somehow, someway had something to do with some of the categories not responding right to your code. And 2nd, there was a space in this line ... ( {$smarty.const.LANG_COLO N} .... that was causing the words (LANG_COLO), to be shown right after the word Price: in the form for those categories that were to show price. I removed the space and now everything seems to be working just perfect.

    I believe your code will be very useful to a lot of other users of 68C as well.

    I want to personally thank you and Mike for all your help with this. It's forums like this, and especially good folks like you guys, who aren't afraid to help when someone has a problem. Makes one feel good about using a product that you know there's going to be support all along the way.

    Thanks Again.

    Rich
  2. Lhotch curmudgeon

    Glad you got it sorted out. Smarty doesnt support creating arrays directly so that little code trick with the explode basically does the same thing. You can do complex logical comparisons without it but then you end up having an if A=B do C kind of thing for EACH value you want to check and its pretty cumbersome.
  3. MrGForce Customer

    I got a lot to learn with php and sql, but I'm trying to learn more each and every day. Stuff like what you're sharing, really helps. I really do appreciate it.

    And I do have another question related to this if I may.

    I just tried using the exact same code that you gave me in the .... usermodifylisting.tpl .... file to keep the price field from showing up when an ad is modified, and it didn't work there. It got rid of the price field, but again it got rid of it in all categories, not just the ones not listed by ID#. Could it be something from the page that it is coming from compared to the page that the new listing is coming from?

    Sorry about adding to this but this should take care of the whole situation. I didn't know about this other price situation until a couple of minutes ago as we were testing things .....

    Rich
  4. Lhotch curmudgeon

    The reason it didnt work there is because there is no $category variable. You going to have to use the {$categoryname} and instead of numbers in the assign line you will need to type out the category name. Im not sure if it uses the actual name or the slug, you will have to enable the debug console and edit ads in those cats to see for certain.
  5. MrGForce Customer

    I'll give that a try Larry. Thanks.
  6. MrGForce Customer

    Hey Larry;

    Did what you said with the {debug} command, and saw where it was picking up the categoryname instead of just category, so I really looked over the info and saw that it was saving the category number that we used in the step3.tpl file under the name of ... $section .... So I tried that, without changing any of the numbers, which there were a lot of, and it seems to be working.

    Thanks again for steering me in the right direction. The site is really coming along. You guys have really been a great help. Couldn't have done it without you.

    Now all that's missing are the listings. I know ............
  7. Lhotch curmudgeon

    Nice detective work. I thought there was something simpler than the name but I missed it when I took a quick glance at the debug output.

Share This Page