Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Display About me on two columns

12 years 1 month ago
Licenses:
JomSocial Expired Socialize Expired

Hi,
clicking on the "About me" button on the user's front page, displays the user's information on one column only.
Is there a way to display on two columns or more, like in the attached file ?
We've found it's in relation with class="cModule cProfile-About app-box" but we don't know how to do it.
How can it be achieved ?
Cheers,
L

Attachments:
12 years 1 month ago
Licenses:

Hi.

Interesting... I'll try to prepare a snippet in spare time.
I'll update this thread when I'll have solution ;)


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
12 years 1 month ago
Licenses:

Hi.

Yes, it can be done :) here is solution for 3 columns:

Copy this file:

ROOT/components/com_community/templates/default/profile.about.php

to:

ROOT/templates/your-template/html/com_community (if you don't have "html" or "com_community" folders, feel free to create them)

Replace this (from line 16 to 110):

<div class="app-box-content">
        <?php
        foreach ($profile['fields'] as $groupName => $items) {
            // Gather display data for the group. If there is no data, we can
            // later completely hide the whole segment
            $hasData = false;
            ob_start();
            ?>
            <div class="cField">

                <?php if ($groupName != 'ungrouped') { ?>
                    <h3 class="cField-Title cResetH"><?php echo JText::_($groupName); ?></h3>
                <?php } ?>

                <ul class="cField-List cResetList">
                    <?php foreach ($items as $item) { ?>
                        <?php
                        if (CPrivacy::isAccessAllowed($my->id, $profile['id'], 'custom', $item['access'])) {
                            // There is some displayable data here
                            $hasData = $hasData || CProfileLibrary::getFieldData($item) != '';
                            ?>

                            <?php
                            $fieldData = CProfileLibrary::getFieldData($item);

                            // Escape unless it is URL type, since URL type is in HTML format
                            if ($item['type'] != 'url' && $item['type'] != 'email' && $item['type'] != 'list' && $item['type'] != 'checkbox') {
                                $fieldData = $this->escape($fieldData);
                            }

                            // If textarea, we need to support multiline entry
                            if ($item['type'] == 'textarea') {
                                $fieldData = nl2br($fieldData);
                            }

                            if (!empty($fieldData)) {

                                ?>
                                <li>
                                    <h3 class="cField-Name cResetH"><?php echo JText::_($item['name']); ?></h3>
                                    <?php if (!empty($item['searchLink']) && is_array($item['searchLink'])) { ?>
                                        <div class="cField-Content">
                                            <?php
                                            foreach ($item['searchLink'] as $linkKey => $linkValue) {
                                                $item['value'] = $linkKey;
                                                if ($item['type'] == 'checkbox') {
                                                    echo '<a href="' . $linkValue . '">' . $item['value'] . '</a><br />';
                                                } else {
                                                    echo '<a href="' . $linkValue . '">' . $fieldData . '</a><br />';
                                                }
                                            }
                                            ?>
                                        </div>
                                    <?php } else { ?>
                                        <div class="cField-Content">
                                            <?php echo (!empty($item['searchLink'])) ? '<a href="' . $item['searchLink'] . '"> ' . $fieldData . ' </a>' : $fieldData; ?>
                                        </div>
                                    <?php } ?>
                                </li>
                                <?php
                            }
                        }
                        ?>
                    <?php } ?>
                </ul>
            </div>
            <?php
            $html = ob_get_contents();
            ob_end_clean();

            // We would only display the profile data in the group if there is actually some
            // data to be displayed
            if ($hasData) {
                echo $html;
                $noData = false;
            }
        }

        if ($noData) {
            if ($isMine) {
                ?>
                <div class="cEmpty">
                    <?php echo JText::_('COM_COMMUNITY_PROFILES_SHARE_ABOUT_YOURSELF'); ?>
                </div>
                <?php
            } else {
                ?>
                <div class="cEmpty">
                    <?php echo JText::_('COM_COMMUNITY_PROFILES_NO_INFORMATION_SHARE'); ?>
                </div>
                <?php
            }
        }
        ?>
    </div>

with this:
<div class="app-box-content">
    	<?php $ilosc = count($profile['fields']); ?>
        <?php $i=0;
        foreach ($profile['fields'] as $groupName => $items) {
            // Gather display data for the group. If there is no data, we can
            // later completely hide the whole segment
            $hasData = false;
            ob_start();     
            ?>
            <?php
					$m++;
					$n++;
				?>
				<?php
					if ($m==1) {
						echo '<div class="row-fluid">';
					}
				?>
            <div class="span4">
            <div class="cField">

                <?php if ($groupName != 'ungrouped') { ?>
                    <h3 class="cField-Title cResetH"><?php echo JText::_($groupName); ?></h3>
                <?php } ?>

                <ul class="cField-List cResetList">
                    <?php foreach ($items as $item) { ?>
                        <?php                      
                        if (CPrivacy::isAccessAllowed($my->id, $profile['id'], 'custom', $item['access'])) {
                            // There is some displayable data here
                            $hasData = $hasData || CProfileLibrary::getFieldData($item) != '';
                            ?>

                            <?php
                            $fieldData = CProfileLibrary::getFieldData($item);

                            // Escape unless it is URL type, since URL type is in HTML format
                            if ($item['type'] != 'url' && $item['type'] != 'email' && $item['type'] != 'list' && $item['type'] != 'checkbox') {
                                $fieldData = $this->escape($fieldData);
                            }

                            // If textarea, we need to support multiline entry
                            if ($item['type'] == 'textarea') {
                                $fieldData = nl2br($fieldData);
                            }

                            if (!empty($fieldData)) {

                                ?>
                                <li>
                                    <h3 class="cField-Name cResetH"><?php echo JText::_($item['name']); ?></h3>
                                    <?php if (!empty($item['searchLink']) && is_array($item['searchLink'])) { ?>
                                        <div class="cField-Content">
                                            <?php
                                            foreach ($item['searchLink'] as $linkKey => $linkValue) {
                                                $item['value'] = $linkKey;
                                                if ($item['type'] == 'checkbox') {
                                                    echo '<a href="' . $linkValue . '">' . $item['value'] . '</a><br />';
                                                } else {
                                                    echo '<a href="' . $linkValue . '">' . $fieldData . '</a><br />';
                                                }
                                            }
                                            ?>
                                        </div>
                                    <?php } else { ?>
                                        <div class="cField-Content">
                                            <?php echo (!empty($item['searchLink'])) ? '<a href="' . $item['searchLink'] . '"> ' . $fieldData . ' </a>' : $fieldData; ?>
                                        </div>
                                    <?php } ?>
                                </li>
                                <?php
                            }
                        }
                        ?>
                    <?php } ?>
                	</ul>
            	</div>
            </div>
				<?php
					if ($m==3) {
					echo '</div>';
					$m=0;
					}
	
					if ($n==$ilosc) {
						echo '</div>';
					}
					?>
            <?php
            $html = ob_get_contents();
            ob_end_clean();

            // We would only display the profile data in the group if there is actually some
            // data to be displayed
            if ($hasData) {
                echo $html;
                $noData = false;
            }
        }

        if ($noData) {
            if ($isMine) {
                ?>
                <div class="cEmpty">
                    <?php echo JText::_('COM_COMMUNITY_PROFILES_SHARE_ABOUT_YOURSELF'); ?>
                </div>
                <?php
            } else {
                ?>
                <div class="cEmpty">
                    <?php echo JText::_('COM_COMMUNITY_PROFILES_NO_INFORMATION_SHARE'); ?>
                </div>
                <?php
            }
        }
        ?>
    </div>

I attach demo file if you'll have problem to implement my hack.

If you want to display data in 2 columns then change span4 to span6, for 4 columns change span4 to span3.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you

This message has an attachment file.
Please log in or register to see it.

The following user(s) said Thank You: testcouch
12 years 1 month ago
Licenses:
JomSocial Expired Socialize Expired

Michal,
first of all thank you for your "spare time", very efficient for us.
Almost done, see our result on julien's profile. Don't know why the first row's got only 2 columns instead of 3.
Anyway thank you very much !
Cheers,
L

Attachments:
12 years 1 month ago
Licenses:

Hi.

It works 100% :)
I just applied my demo file for you and it look as expected: prntscr.com/4mzzcf (I did it by template override).


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
12 years 1 month ago
Licenses:
JomSocial Expired Socialize Expired

Hi,
it's confusing because we've modified by hand as you said file profile.about.php.
And in the demo, file is frontpage.guest.php. So which one is the good one ?
Cheers,
L

12 years 1 month ago
Licenses:

Hi.

frontpage.guest.php was my mistake, zip should contain profile.about.php.
Code is fine as other user confirmed it works for him. And it's exact copy from my file.
You probably missed something - I haven't review your code, just applied my demo file ;)


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
12 years 1 month ago
Licenses:
JomSocial Expired Socialize Expired

Hi,
we've just copied the file from the override ROOT/templates/Socialize/html/com_community/profile.about.php
to our other site test. We still have the 2 columns on the first row. Can't figure out what's wrong.
Even after clearing the cache. It's a mystery
Cheers,
L

12 years 1 month ago
Licenses:

HI.

But on live site everything is ok?
What is the link to dev site? Will FTP access for your main site work for dev site as well?


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
12 years 1 month ago
Licenses:
JomSocial Expired Socialize Expired

hi,
you're right.
But we just want to understand why not on our other site.
Just in case we've updated the credential info in the ticket, in order to access to it.
cheers,
L

12 years 1 month ago
Licenses:

HI.

That is strange indeed.
For some reason first columns has value 2 instead of 1. This first element displayed so it HAS to have 1... it just look like forst columnt was blank and counting starts from 2 not 1...
I'm not sure what cause that...


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW