Гость
18 Янв 2013 02:50
  1. How can I sort Alpha index text manually - not automatically (on pic1 you can see last 3 digits on the end, but they should be inside alphabet).

  2. How can I align thumbnail picture left, I think it can be done in Bootstrap, I searched everywhere in Bootstrap forums but can't find answer, can you help?

  3. On pic1 you can see bad looking pagination, again Bootstrap?

  4. If I click on test1 (pic1) and I'm not logged, I got message "You have no rights...", despite that I have "Who can view" set to Public (pic2). I have the same test page in Cobalt7 and permissions work fine. I don't have a clue where permissions are set wrong.

  5. When I'm logged as registered user, I can go further to see full article (pic4). How can I make this image field to be full wide (100% width)

Последние изменения: 02 Март 2014


Sergey
Total posts: 13,748
18 Янв 2013 06:34

1)

To sort manually you can only by changing its code in markup template.

2) just by adding pull-left to picture tag in field template.

To hide label width on image turn label off in the field and set break after label.

3)

Pagination is formated by bootstrap. i do not know other way to change it only create your own file in templates/[tmpl_name]/html/pagination.php

4) Please check articles access level. Is it 1? Or 2?

5) hide label as described above and set width in full view bigger.


Гость
20 Янв 2013 05:04
  1. I tried to find where to change code in markup template: compnents\com_cobalt\views\records\tmpl\default_markup_default : css. php, xml files. I couldn't find solution. Can you tell me exactly where to find file to edit?

  2. I tried with components\com_cobalt\fields\image\tmpl\output\list.php, but don't know where exactly to put pull-left. Maybe here somewhere:

<img src="/"

class="img-polaroid"

hspace="<?php echo $this->params->get('params.img_list_hspace');?>"

vspace="<?php echo $this->params->get('params.img_list_vspace');?>"

alt="<?php echo $image->get('image_title', $record->title);?>"

title="<?php echo $image->get('image_title', $record->title);?>"></a>
  1. Yes, record access level is now set to Registered. How can I change it to Public?

  2. I tried with components\com_cobalt\fields\image\tmpl\output\full.php. Can you tell me exactly how to edit width? "To hide label width on image turn label off in the field and set break after label." Do you mean here (see attachment)?


Sergey
Total posts: 13,748
20 Янв 2013 08:03

1) in template php file line 607 starts with

get('main.alpha') && $this->alpha && $this->alpha_list && $this->items):?>

Or search file for work alpha

2) <img src="/"

class="img-polaroid pull-left"

4) You can set it to publiс by editing and setting access level special field. And also be sure content type -> submission - > who can see record is set to public. This is default access level to set to record on creation.

5) image field has parameters for full view size. Just set there what you need.


Гость
20 Янв 2013 10:41
  1. I found file, but I don't know what to change there to manual sort alpha index:
get('main.alpha') && $this->alpha && $this->alpha_list && $this->items):?>
<div class="alpha-index">

    <?php foreach ($this->alpha AS $set):?>

        <div class="alpha-set">

            <?php foreach ($set AS $alpha):?>

                <?php if(in_array($alpha, $this->alpha_list)):?>

                    <span class="label label-warning" onclick="Cobalt.applyFilter('filter_alpha', '<?php echo $alpha?>')" <?php echo $markup->get('main.alpha_num') ? 'rel="tooltip" data-original-title="'.JText::sprintf('CXNRECFOUND', $this->alpha_totals[$alpha]).'"' : NULL;?>><?php echo $alpha; ?></span>

                <?php else:?>

                    <span class="label"><?php echo $alpha; ?></span>

                <?php endif;?>

            <?php endforeach;?>

        </div>

    <?php endforeach;?>

</div>

<br>

2.I added pull-left to my com_cobalt\fields\image\tmpl\output\list.php, line 30, now it looks:

<img src="/"

class="img-polaroid pull-left "

but result is the same, (see img6.jpg)

  1. Resize full view is good now, but is still aligned right. I would like to have image field and textarea below image to be aligned left. Would you tell me how?

Sergey
Total posts: 13,748
20 Янв 2013 23:49

1) after line

get('main.alpha') && $this->alpha && $this->alpha_list && $this->items):?>

insert

alpha[] = explode(' ', 'a b c d...') ?>

Where a b c d... in the order you want ti to be.

2, 5 )

You have to turn off label and add break after label for this field in field parameters


Гость
21 Янв 2013 01:08
  1. I inserted like you said and now it looks:
get('main.alpha') && $this->alpha && $this->alpha_list && $this->items):?> alpha[] = explode(' ', 'a b c č d e f g h i j k l m n o p r s š t u v z ž') ?>
<div class="alpha-index">

    <?php foreach ($this->alpha AS $set):?>

        <div class="alpha-set">

            <?php foreach ($set AS $alpha):?>

                <?php if(in_array($alpha, $this->alpha_list)):?>

                    <span class="label label-warning" onclick="Cobalt.applyFilter('filter_alpha', '<?php echo $alpha?>')" <?php echo $markup->get('main.alpha_num') ? 'rel="tooltip" data-original-title="'.JText::sprintf('CXNRECFOUND', $this->alpha_totals[$alpha]).'"' : NULL;?>><?php echo $alpha; ?></span>

                <?php else:?>

                    <span class="label"><?php echo $alpha; ?></span>

                <?php endif;?>

            <?php endforeach;?>

        </div>

    <?php endforeach;?>

</div>

<br>

But now I have 2 alpha indexes and new one isn't active (see attachment.)

  1. Image field and textarea field now I have aligned left and it's OK on full view, but in list view images are still aligned right (same attachment).

Sergey
Total posts: 13,748
21 Янв 2013 06:11

1) change

alpha[] = explode(' ', 'a b c č d e f g h i j k l m n o p r s š t u v z ž') ?>

to

alpha = array(explode(' ', 'a b c č d e f g h i j k l m n o p r s š t u v z ž')); ?>

2) I applyes small fis for simple list template next update. You use this template, do you?


Гость
21 Янв 2013 08:46
  1. I made changes, it is good looking now, but it isn't active - letter buttons are dead.

  2. I use blog template, but I can easily change to simple list when update is ready.


Sergey
Total posts: 13,748
21 Янв 2013 23:06
  1. I made changes, it is good looking now, but it isn't active - letter buttons are dead.

Only letters that may return something are active. i mean if there is no articles starting with letter a then it is inactive.

  1. I made changes, it is good looking now, but it isn't active - letter buttons are dead.

  2. I use blog template, but I can easily change to simple list when update is ready.

I thought you use simple list. I'll apply fix to blog template too.


Гость
22 Янв 2013 01:05
  1. On image8.jpg you can see that I have articles which start with letters t and z already: old alpha index have 2 letters active (t and Z), new one is dead.

Sergey
Total posts: 13,748
22 Янв 2013 02:02

try like this

alpha = array(explode(' ', JString::strtoupper('a b c č d e f g h i j k l m n o p r s š t u v z ž'))); ?>
Работает на Cobalt