1 denis012 Jul 27, 2014 14:26
3 denis012 Jul 27, 2014 19:32
I use the skin "mystique "
i mean, how in PHP i can get the list of the variable $Item->categories();
how can i remove the hyperlink when i use the $Item->categories(); code so that it is plan text without the hyperlinks in it
to disable all functions around item
thanks
4 mgsolipa Jul 28, 2014 06:59
Hello @denis012,
The most of that kind of methods could be customized according the parameters that you pass them. Those parameters are in an array and you may know which options are available and how can be used, just by going directly to the code of the method that you are using.
For example, in categories()
and tags()
you may include
'link_categories' => false,
in the parameters array to grab only the name of the element in plain text.
I suggest you to use this PHPXref for further reference: https://github.com/mgsolipa/b2evolution_phpxref. Just make a local copy of the repository and check it whenever you want. Use the Search box at the right top corner to find anything you need.
Regards!
5 denis012 Jul 28, 2014 08:44
mgsolipa thanks fdor your comment,
i know that i can use the array and all the parameters but still its dosnt give me a clean output
how can i controll this parameters? i wich file i can edit the parameters for categories() and tags()?
6 mgsolipa Jul 28, 2014 18:47
@denis012 please, check the attached images. The first one is the default behavior of the Mystique skin when it displays the categories list. The second one, shows the modification that you need to do to get rid of the link on each category name. The final result is a plain text list of the categories to which the current item belongs.
In order to repeat the same with the tags, you need to do this:
1 Go to the file skins/mystique/_item_blog.inc.php
2 Look for this block of code:
// List all tags attached to this post:
$Item->tags( array(
'before' => '<div class="post-tags" title="'.$Skin->T_('Tags').'">',
'after' => '</div>',
'separator' => ', ',
) );
3 Replace it with:
// List all tags attached to this post:
$Item->tags( array(
'before' => '<div class="post-tags" title="'.$Skin->T_('Tags').'">',
'after' => '</div>',
'separator' => ', ',
'links' => false,
) );
@denis012,
1. What's the skin are you using, is this custom or from the community skins page?
2. in customizing the location of the code, please make sure to place the code accordingly in the skin you use,( which we don't have any clue yet, answer #1 first)
3. <div id="tags"> , this indicates the location of the tags, go to the css file of your skin folder and look for #tags and change the properties of it to fit your needs.
Thanks!