test
Viewing 15 posts - 16 through 30 (of 61 total)
  • Author
    Posts
  • ktbgreat2 Friend
    #468250

    Oh No…somethings not quite right… just got this error

    Parse error: syntax error, unexpected $end in /home/content/02/8796802/html/templates/ja_wall/html/com_k2/ja_wall/category_item.php on line 280

    ktbgreat2 Friend
    #468251

    Could it be the 2 & near the “Frasier Props” bit

    ktbgreat2 Friend
    #468252

    Oh also to answer your question before… I will only be doing this sparringly every now and then, so I guess Im excluding not including…

    arucardx Friend
    #468254

    Sorry was missing a 3rd <?php endif; ?> try the code below, it should work now. Tested it on my site.

    [PHP]<?php if ($this->item->params->get(‘catItemReadMore’)): ?>
    <?php if ($this->item->category->name == ‘Frasier Props’ && $this->item->category->name == ‘Friends Props’): ?>
    <p class=”readmore”>
    <a class=”item-link” href=”<?php echo $this->item->category->link; ?>”><?php echo JText::_(‘K2_WALL_READ_MORE’); ?></a>
    </p>
    <?php else: ?>
    <p class=”readmore”>
    <a class=”item-link” href=”<?php echo $this->item->link; ?>”><?php echo JText::_(‘K2_WALL_READ_MORE’); ?></a>
    </p>
    <?php endif; ?>
    <?php endif; ?>
    <?php endif; ?>[/PHP]

    ktbgreat2 Friend
    #468256

    Bummer sorry arucardx

    I just got this error
    Parse error: syntax error, unexpected T_ENDIF in /home/content/02/8796802/html/templates/ja_wall/html/com_k2/ja_wall/category_item.php on line 269

    ktbgreat2 Friend
    #468257

    Oh its ok!! Its working now..I just noticed I had a
    <?php endif; ?>
    above my code…. just a remnant from the old code think!!! The site is showing good now!! Just gotta test it!

    ktbgreat2 Friend
    #468258

    Hmm I just made a category called Friends Props and set the category template to Ja_wall. Then I made a K2 Item called Friends Props (and set it to Friends Props Category)… but it directs me to the usual item page, not a wall… Have I missed something obvious!?

    arucardx Friend
    #468261

    Are you able to provide a link to your site so I can see the source code output on the page? Btw since we only modified the link on read more, you need to actually click on read more to see the effect.

    Alternatively you can replace && with || and see if it works.

    ktbgreat2 Friend
    #468263

    Hi, sure thing!
    My site is http://www.sillynym.com (changing that later ;)) and Im putting these items on the front page buy adding a tag “homepage”

    sorry those 2 dashes..are they L’s ? Hmm I dont recognize them, they seem very long.

    ktbgreat2 Friend
    #468264

    Bummer, I just copied those dashes and replaced those && , then refreshed my page and clicked “read more” but still no luck 🙁

    arucardx Friend
    #468265

    The two || is from the key above enter which create

    I forgot what the | is called lol, but it’s not a L. Can you try that and see if it works? The if check seems to have failed so the conditions checking is most likely wrong. I’m always confused with the usage of && or || sometimes they works here, sometimes they don’t work there. But if it doesn’t then we need to test if the code is even working by testing without condition checking.

    Meaning we just use this code as it is. We do not check for category name. That way we can test if the link that’s being echo is correct.
    [PHP]<?php if ($this->item->params->get(‘catItemReadMore’)): ?>
    <p class=”readmore”>
    <a class=”item-link” href=”<?php echo $this->item->category->link; ?>”><?php echo JText::_(‘K2_WALL_READ_MORE’); ?></a>
    </p>
    <?php else: ?>[/PHP]

    ktbgreat2 Friend
    #468266

    Heheh I didnt even know the key existed, so your always gonna win against me! Found it though, and tested itm but no luck 🙁

    Sure I can try that code.. do I just replace the old code you gave me, with this one?

    Ill try it now anyway 🙂

    ktbgreat2 Friend
    #468267

    Ok.. its in, and everything is acting normally

    ktbgreat2 Friend
    #468269

    Oh no I spoke too soon, my front page is fine.. but just got this error when I checked my category links

    Parse error: syntax error, unexpected $end in /home/content/02/8796802/html/templates/ja_wall/html/com_k2/ja_wall/category_item.php on line 274

    arucardx Friend
    #468271

    Lol ok, i think I see where the problem is. You are using tags to display the article on frontpage thus it’s actually loading tag.php instead of category_item.php

    Please replace with your category_item.php with the original copy for now or just revert back to the code that was not giving you an error just now. Then go to com_k2defaulttag.php note that it’s the default folder, not JA Wall.

    Remember to make a backup of the file. Then look for this block of code around line 171.
    [PHP]
    <?php if ($item->params->get(‘tagItemReadMore’)): ?>
    <p class=”readmore”>
    <a class=”item-link” href=”<?php echo $item->link; ?>”>
    <?php echo JText::_(‘K2_READ_MORE’); ?>
    </a>
    </p>
    <?php endif; ?>[/PHP]

    Replace it with this block of code.
    [PHP] <?php if ($item->params->get(‘tagItemReadMore’)): ?>
    <?php if ($item->category->name == ‘Frasier Props’ && $item->category->name == ‘Friends Props’): ?>
    <p class=”readmore”>
    <a href=”<?php echo $item->category->link; ?>”><?php echo JText::_(‘K2_READ_MORE’); ?></a>
    </p>
    <?php else: ?>
    <p class=”readmore”>
    <a class=”item-link” href=”<?php echo $item->link; ?>”><?php echo JText::_(‘K2_READ_MORE’); ?></a>
    </p>
    <?php endif; ?>
    <?php endif; ?>
    <?php endif; ?>[/PHP]

    That should solve your problem =) Was loading the wrong file on homepage.

Viewing 15 posts - 16 through 30 (of 61 total)

This topic contains 61 replies, has 2 voices, and was last updated by  arucardx 12 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum