test
Viewing 15 posts - 31 through 45 (of 61 total)
  • Author
    Posts
  • ktbgreat2 Friend
    #468273

    Oh totally makes sense!!
    Ill give it a go 🙂

    I might actually do that tomorrow though, and let you know how it goes!! Its almost 4 am here and my eyes are crossing over! Thanks so much for your help!! Ill be so excited once this works… Tomorrow!!!

    Cheers for now,
    Katie

    ktbgreat2 Friend
    #468276

    Shoot..I couldnt wait and tried but no luck yet… sorry!

    I made sure to go to the default folder not Ja_wall too…in com_k2

    Gosh tricky one this huh!

    arucardx Friend
    #468277

    Try using this code, I was able to get it working on my site. Had to use || instead of &&. I was able to get the code working on my site, don’t see any reason why this one should fail.

    Use this code in default/tag.php
    [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]

    Edit, only two <?php endif; ?> is required here. I dunno why category_item.php required a 3rd endif just now. Didn’t have the time to go check it in details.

    ktbgreat2 Friend
    #468292

    Wow Finally!!!! GOT IT!!!! Thank you so much arucardx!! Youve been so patient with me!

    There was one problem when I put that code in, as everything was as always. Nothing had changed when I put it in the tag file in the Default folder…and I went to sleep thinking of files and codes ALL night long!

    Then this morning I went and checked my Menu Homepage settings and saw that the template in “Basic settings” was actually set to Ja_wall showcase….So I took a guess and put the code in the tag file there!!!

    Tada! Im so glad it works.

    I was just wondering if now, since its working, if I could add it to other links, like the picture and title of the Item preview… ? Too Much?

    Also just to be extra sure, when I want to add another one of these, would it look like this?

    <?php if ($item->params->get(‘tagItemReadMore’)): ?>
    <?php if ($item->category->name == ‘Frasier Props’ || $item->category->name == ‘Friends Props’ || $item->category->name == ‘Seinfeld 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; ?>

    Cheers 🙂

    arucardx Friend
    #468295

    I’m glad you found the problem =) Never would have guessed it’s on JA Wall Showcase. As for your question, yes you can add it to other links like the pictures and titles. The code structure should look somewhat the same though the value of some parameters will be different, so you cannot just reuse that same block of code elsewhere.

    You will need to understand how that code of block works then apply it to other links. Just one thing to take note of since it’s not really written anywhere. The class=”item-link” tells the link to open in the pop up preview if enabled. (There’s a javascript somewhere that does the check).

    So as you can see in the code I gave you, the redirect link to the category doesn’t have the class “item-link”. You will want to take note of this unless you want your category page to open in a pop up preview =)

    ktbgreat2 Friend
    #468363

    Hi again!

    Yeh I didnt sleep well, but when I woke up I had the idea in my head…so all the tossing and turning was worth it! I have been able to add alot more categories to that code and its working great!

    I havnt tried working with the image or title code yet, but thats the next thing to do.

    I just notice today though, that of course the new Item that I have created simply as a preview on the frontpage also turns up in the category showcase. I was wondering whether there was a way to exclude an item with the category showcase. I of course have to give an item a category eg Friends but I dont want it to show up on the Friends wall…only on the frontpage using the new Friends category code you created.

    A bit confusing! Do you know what I mean?

    Thanks
    Katie

    arucardx Friend
    #468372

    I may be wrong, but assuming I understand you correctly, it’s not possible to exclude an item from appearing on it’s own category page.

    But you may be able to create a similar effect by setting the category or menu item to display featured only. That way unfeatured article will not appear on that menu page.

    ktbgreat2 Friend
    #468375

    Yes, that makes sense Ill try it!! Thanks again 🙂

    ktbgreat2 Friend
    #468376

    Yup!! Points to you again!! It works great 🙂

    ktbgreat2 Friend
    #468446

    Hi again, Sorry I tried to do this myself without bothering you, but it just looks abit tricky so thought Id ask 🙂 I just want to do the same as we did to the “Read More”, now to the Image link and Title link…

    Ive found the code I think is what needs to be replaced, would you mind giving me a new code to substitute these with 🙂
    After this I think Ill be finished!

    Image Code

    [PHP] <?php if(!empty($item->image)): ?>
    <!– Item Image–>
    <div class=”item-image”>
    <a class=”item-link” href=”<?php echo $item->link; ?>” title=”<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>”>
    <img src=”<?php echo $item->image; ?>” alt=”<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>” />
    <span> </span>
    </a>
    </div>
    <!– //Item Image–>
    <?php endif; ?>[/PHP]

    Title Code

    [PHP]<div class=”item-main clearfix”>
    <!– Item header –>
    <div class=”header item-header clearfix”>
    <?php if($item->params->get(‘tagItemTitle’,1)): ?>
    <!– Item title –>
    <h2>
    <?php if ($item->params->get(‘tagItemTitleLinked’,1)): ?>
    <a href=”<?php echo $item->link; ?>”>
    <?php echo $item->title; ?>
    </a>
    <?php else: ?>
    <?php echo $item->title; ?>
    <?php endif; ?>
    </h2>
    <?php endif; ?>[/PHP]

    arucardx Friend
    #468488

    All you need to is is create the if loop for condition check then replace
    [PHP]<?php echo $item->link; ?>[/PHP]
    with
    [PHP]<?php echo $item->category->link; ?>[/PHP]
    to get the redirect link to category page for that item.

    ktbgreat2 Friend
    #468491

    Hi, I just tried with the Title link, but I must have done something wrong because I have got the error;

    Parse error: syntax error, unexpected T_ENDFOREACH in /home/content/02/8796802/html/templates/ja_wall/html/com_k2/ja_wall_showcase/tag.php on line 205

    Heres the code that I just made 🙂

    [PHP] <?php if ($item->params->get(‘tagItemTitleLinked’,1)): ?>
    <a href=”<?php if ($item->category->name == ‘How I Met Your Mother’ || $item->category->name == ‘Friends’|| $item->category->name == ‘The Big Bang Theory’|| $item->category->name == ‘Modern Family’|| $item->category->name == ‘Chuck’|| $item->category->name == ‘Vampire Diaries’|| $item->category->name == ‘Seinfeld’|| $item->category->name == ‘Mad Men’|| $item->category->name == ‘Frasier’|| $item->category->name == ‘Two and a Half Men’|| $item->category->name == ‘Accidentally On Purpose’|| $item->category->name == ‘Better With You’|| $item->category->name == ‘Other Shows’): ?>”>
    <?php echo $item->title; ?>
    </a>
    <?php else: ?>
    <?php echo $item->title; ?>
    <?php endif; ?>
    </h2>
    <?php endif; ?>[/PHP]

    ktbgreat2 Friend
    #468497

    Oh I think I see what Ive done wrong.. one sec

    ktbgreat2 Friend
    #468499

    Got it!! Sorry.. I over thought it… I just didnt see the right code straight away and when on a tangent… found the code you meant and it works on the Title link now!!

    ktbgreat2 Friend
    #468500

    And on the Image link now too!!!! Great thats it!! All done here I think.. Thanks so much for your help arucardx!! Youve been the best help 🙂 Cheers

Viewing 15 posts - 31 through 45 (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