Title of view photo page

Hello!

Does anyone know how to make title of view photo page like: Photo: name of photo, description photo. I mean tag <title></title>.

Quote · 27 Feb 2012

Hello

You need to edit modules/boonex/photos/classes/BxPhotosPageView.php file. Find the following code in BxPhotosPageView function

$this->oSearch = new BxPhotosSearch();
$this->oTemplate->addCss('view.css');

and add the code below just after it.

$sTitle = _t('_bx_photos_photo') . ' ' . $aFileInfo['medTitle'] . ', ' . $aFileInfo['medDesc'];
$this->oTemplate->setPageTitle($sTitle);

Then add language key _bx_photos_photo => Photo: via admin panel -> settings -> languages settings -> manage keys.

That's all.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
Quote · 27 Feb 2012

Thank you very much!

Quote · 28 Feb 2012

Hello

You are welcome. :)

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
Quote · 28 Feb 2012

Hello Anton,

Can you help me to get rid of the photo title in "view photo" or "view ad"? I sometimes look at a members photo and its title is a looong number like 847464_37444_383837373   and it looks bad so I want to get rid of it.

I attached an example.

Thank you.

Image title.jpg · 73.9K · 371 views
Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 6 May 2012

 

Hello Anton,

Can you help me to get rid of the photo title in "view photo" or "view ad"? I sometimes look at a members photo and its title is a looong number like 847464_37444_383837373   and it looks bad so I want to get rid of it.

I attached an example.

Thank you.

I hate this as well! 

i.e. 548617_10150686883699130_781434129_9745345_1128622285_n.jpg

as in copied from Facebook.

I thought it was in the permalinks, yoursite.com//administration/settings.php?cat=26

Looking at this I have been trying to come up with something.

This is for wordpress but I get what it does now..

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 6 May 2012

 Yeah I hate it too Newton.

I'm glad I have you on board to fix this one. Its such a random unnecessary line on the page.

 

 

Hello Anton,

Can you help me to get rid of the photo title in "view photo" or "view ad"? I sometimes look at a members photo and its title is a looong number like 847464_37444_383837373   and it looks bad so I want to get rid of it.

I attached an example.

Thank you.

I hate this as well! 

i.e. 548617_10150686883699130_781434129_9745345_1128622285_n.jpg

as in copied from Facebook.

I thought it was in the permalinks, yoursite.com//administration/settings.php?cat=26

Looking at this I have been trying to come up with something.

This is for wordpress but I get what it does now..

 

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 6 May 2012

Come'on dolphins!....it should be an easy fix.

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 8 May 2012

 

 

Hello Anton,

Can you help me to get rid of the photo title in "view photo" or "view ad"? I sometimes look at a members photo and its title is a looong number like 847464_37444_383837373   and it looks bad so I want to get rid of it.

I attached an example.

Thank you.

I hate this as well! 

i.e. 548617_10150686883699130_781434129_9745345_1128622285_n.jpg

as in copied from Facebook.

I thought it was in the permalinks, yoursite.com//administration/settings.php?cat=26

Looking at this I have been trying to come up with something.

This is for wordpress but I get what it does now..

 Yes  indeed

i  hate  it   too

Quote · 8 May 2012

Ok so if we get more posts from people who don't like it then finally someone will pay attention and share the fix to this thing.

Anton! we are counting on you :)

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 8 May 2012

 

Ok so if we get more posts from people who don't like it then finally someone will pay attention and share the fix to this thing.

Anton! we are counting on you :)

   i  hope   so

Quote · 9 May 2012

 Just keep this thread alive and someone will present us with the solution.

 

 

Ok so if we get more posts from people who don't like it then finally someone will pay attention and share the fix to this thing.

Anton! we are counting on you :)

   i  hope   so

 

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 9 May 2012

up

Quote · 10 May 2012

The title uses the image name so 548617_10150686883699130_781434129_9745345_1128622285_n.jpg


This is the image name so it appears there. You can change the image name before posting.

so much to do....
Quote · 10 May 2012

 

The title uses the image name so 548617_10150686883699130_781434129_9745345_1128622285_n.jpg


This is the image name so it appears there. You can change the image name before posting.

 

Tell that to user's   

rrsrsrsrs

Quote · 10 May 2012

 Prashank,  I'm sure we can remove photo title somehow. Facebook doesn't have it, right?

If we cannot move it maybe we can set it up so that it will not allow numbers in photo title but that will annoy the users and it won't work so good. I think its best to remove it!

 

The title uses the image name so 548617_10150686883699130_781434129_9745345_1128622285_n.jpg


This is the image name so it appears there. You can change the image name before posting.

 

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 10 May 2012

I was able to change the long description to a default message, and that is in the view block. Showing under the picture, not the loooooooooooooooooooooooong link below the breadcrumbs

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 10 May 2012

/modules/boonex/photos/templates/base/view_unit.html

line 18 and 19

<div class="fileTitle" style="width:__width_ext__px;">

    __fileTitle__

I changed to this

<div class="fileTitle" style="width:__width_ext__px;">

    <p>Duval Locals Photos System</p>

Title Change below picture

[edit] had to do this because of so many photos uploaded this way via a Facebook module

I have been looking to change the other, I'll find it soon..

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 10 May 2012

It   would be   Great   if   this  could  be   something  like 

get  some  info  of  the user

 

like state | city | relationship

 

that   do  you  think???

 

 

/modules/boonex/photos/templates/base/view_unit.html

line 18 and 19

<div class="fileTitle" style="width:__width_ext__px;">

    __fileTitle__

I changed to this

<div class="fileTitle" style="width:__width_ext__px;">

    <p>Duval Locals Photos System</p>

Title Change below picture

[edit] had to do this because of so many photos uploaded this way via a Facebook module

I have been looking to change the other, I'll find it soon..

 

Quote · 10 May 2012

How about adding a button next to the title that links to the Actions > Edit popup so the image *owner* (or site admins) can changed the image title?  

http://pkforum.dolphinhelp.com
Quote · 10 May 2012

 

How about adding a button next to the title that links to the Actions > Edit popup so the image *owner* (or site admins) can changed the image title?  

 I tried putting the code found in the actions block, but, it has a picture number for each and every photo

http://www.yoursite.com/m/photos/edit/1817

the problem is what is in red, it will not pull up the right image if you leave the 1817 off, which is the image number I guess.


Until someone more versed in code comes up with a solution this is what I'm going to do..

added this under the image

"Site Members, please use the "edit" button below to change the name of your image to what you want.."

look below the image, move the actions block below the "View Photo" box.

Work Around

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 10 May 2012

Hey Newton!  when we upload a photo we need to insert...

*title

tags

*description

categories

What will happen if we remove *title from the form?

Facebook photos don't have a name, right?

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 11 May 2012

 

Hey Newton!  when we upload a photo we need to insert...

*title

tags

*description

categories

What will happen if we remove *title from the form?

Facebook photos don't have a name, right?

 That's needed for the database. It processes the image and gives it an incremental number looks like.

That number is stored in the database i.e. the photo above it number 2288 in the database, with 

the long 548617_10150686883699130_781434129_9745345_1128622...

in three tables. Title, Uri, and Desc all with the same entry, so leaving that off is a no.

[edit] that is a facebook photo.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 11 May 2012

I understand it better now, thanks.

Well, I guess we need someone like Deano92964 to help us handle this one.

It must be a simple fix.

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 11 May 2012

Main photo info - you will find it here

inc/classes/BxDolFilesTemplate.php

function getBasicFileInfoForm (&$aInfo, $sUrlPref = '') {
        $aForm = array(
            'title' => array(
                'type' => 'value',
                'value' => $aInfo['medTitle'],
                'caption' => _t('_Title'),
            ),
            'album' => array(
                'type' => 'value',
                'value' => '<a href = "' . $sUrlPref . 'browse/album/' . $aInfo['albumUri'] . '/owner/' . $aInfo['NickName'] . '">' . $aInfo['albumCaption'] . '</a>',
                'caption' => _t('_sys_album'),
            ),
            'desc' => array(
                'type' => 'value',
                'value' => process_text_withlinks_output($aInfo['medDesc']),
                'caption' => _t('_Description'),
            ),



but this is used on several of the modules, like files, sound, video and photos...and maybe more places also

probably not so easy to change

Quote · 11 May 2012

edit __fileTitle__

you will find it here

modules/boonex/photos/classes/BxPhotosPageView.php


function getBlockCode_ViewFile () {
        $oVotingView = new BxTemplVotingView($this->oConfig->getMainPrefix(), $this->aFileInfo['medID']);
        $iWidth = (int)$this->oConfig->getGlParam('file_width');
        if ($this->aFileInfo['prevItem'] > 0)
            $aPrev = $this->oDb->getFileInfo(array('fileId'=>$this->aFileInfo['prevItem']), true, array('medUri', 'medTitle'));
        if ($this->aFileInfo['nextItem'] > 0)
            $aNext = $this->oDb->getFileInfo(array('fileId'=>$this->aFileInfo['nextItem']), true, array('medUri', 'medTitle'));
        $aUnit = array(
            'pic' => $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file'),
            'width_ext' => $iWidth + 2,
            'width' => $iWidth,
            'fileTitle' => $this->aFileInfo['medTitle'],
            'rate' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting(1, $this->aFileInfo['Rate']): '',
            'favInfo' => $this->oDb->getFavoritesCount($this->aFileInfo['medID']),
            'viewInfo' => $this->aFileInfo['medViews'],

Quote · 11 May 2012

 What does this fix do?

 

edit __fileTitle__

you will find it here

modules/boonex/photos/classes/BxPhotosPageView.php


function getBlockCode_ViewFile () {
        $oVotingView = new BxTemplVotingView($this->oConfig->getMainPrefix(), $this->aFileInfo['medID']);
        $iWidth = (int)$this->oConfig->getGlParam('file_width');
        if ($this->aFileInfo['prevItem'] > 0)
            $aPrev = $this->oDb->getFileInfo(array('fileId'=>$this->aFileInfo['prevItem']), true, array('medUri', 'medTitle'));
        if ($this->aFileInfo['nextItem'] > 0)
            $aNext = $this->oDb->getFileInfo(array('fileId'=>$this->aFileInfo['nextItem']), true, array('medUri', 'medTitle'));
        $aUnit = array(
            'pic' => $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file'),
            'width_ext' => $iWidth + 2,
            'width' => $iWidth,
            'fileTitle' => $this->aFileInfo['medTitle'],
            'rate' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting(1, $this->aFileInfo['Rate']): '',
            'favInfo' => $this->oDb->getFavoritesCount($this->aFileInfo['medID']),
            'viewInfo' => $this->aFileInfo['medViews'],

 

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 12 May 2012

No fix, only shows where you find the code Smile

Quote · 12 May 2012

It's certainly not my facebook mod thats doing it. When my facebook connect imports photos from facebook it uses the title it finds on facebook. If the facebook member was too lazy to enter a title then my mod sets it to the word Untitled.

During regular upload of photos, dolphin uses the filename to preload the title field. So it's your users that are too lazy to change the title that is sitting right there under their nose before they click the submit button.

Exactly what is it you want that field preloaded with if not the filename?

https://www.deanbassett.com
Quote · 12 May 2012

 

I understand it better now, thanks.

Well, I guess we need someone like Deano92964 to help us handle this one.

It must be a simple fix.

As a rule of thumb. Nothing in dolphin is simple.


https://www.deanbassett.com
Quote · 12 May 2012

 

It's certainly not my facebook mod thats doing it. When my facebook connect imports photos from facebook it uses the title it finds on facebook. If the facebook member was too lazy to enter a title then my mod sets it to the word Untitled.

During regular upload of photos, dolphin uses the filename to preload the title field. So it's your users that are too lazy to change the title that is sitting right there under their nose before they click the submit button.

Exactly what is it you want that field preloaded with if not the filename?

 Hey Deano, not referring to your mod.. Your facebook connect works perfect! 

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 May 2012

look at this image https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash3/s720x720/577316_428813610465141_100000095161782_1579361_1846445433_n.jpg

(anaconda movie scene Laughing)

here you can see facebook image name is just like that lots of numbers in it. Dolphin pull that if you don't give it another name. Its so simple.. It can't predict its name you have to give it to dolphin.

so much to do....
Quote · 12 May 2012

 Hello Deano,  we basically just want to get rid of the annoying long number line. We understand that our members are lazy but I think we are the ones who need to adjust to them and if they won't/can't name each photo then I believe its best to remove it.

If we can't find a way to remove it I guess I'll use Newton's line change with your "untitled" wording and that will be a fair compromise and instead of having a long number there I'll get "untitled".

 

It's certainly not my facebook mod thats doing it. When my facebook connect imports photos from facebook it uses the title it finds on facebook. If the facebook member was too lazy to enter a title then my mod sets it to the word Untitled.

During regular upload of photos, dolphin uses the filename to preload the title field. So it's your users that are too lazy to change the title that is sitting right there under their nose before they click the submit button.

Exactly what is it you want that field preloaded with if not the filename?

 

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 12 May 2012

you can code it like a way the uploaded image's title will be checked for numbers and if found will be replaced with a default name you set

so much to do....
Quote · 12 May 2012

This is what I really want,

Edit Button Under Image

this will work right now. for this photo only!  

Deano, do you think you can figure this out?

[removed link]

 

using this to put button there,

<div class="button_wrapper" style="width:100%; margin: 0;" onclick="window.open('http://www.duvallocals.info/m/photos/edit/2288', '_blank', 'width=500,height=380,menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no') ">    <div class="button_input_wrapper">    <button class="form_input_submit" type="button">            <img alt="Edit" src="http://www.duvallocals.info/templates/base/images/icons/edit.png">            Edit        </button>    </div>

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 May 2012

in what file you are putting this code in? Its id can be pulled i think

so much to do....
Quote · 12 May 2012

 

in what file you are putting this code in? Its id can be pulled i think

 it would be great to figure out the ID, that is the hang up.

As you see in RED relates the to the ID for the database.

I'm putting this in view_unit.html   [edited to show Prashank25 solution to this..] 

            <img src="__pic__" class="fileUnitSpacer"/><div class="button_wrapper" style="width:100%; margin: 0;" onclick="window.open('http://www.duvallocals.info/m/photos/edit/__id__', '_blank', 'width=500,height=380,menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no') ">    <div class="button_input_wrapper">    <button class="form_input_submit" type="button">            <img alt="Edit" src="http://www.duvallocals.info/templates/base/images/icons/edit.png">            Edit        </button>    </div></div><h4 align="center">Site Members, please use the <b>"edit"</b> button below to change the name of your image to what you want..</h4>        </div>    

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 May 2012

open BxPhotosPageView.php at line 152 add 'id' => $this->aFileInfo['medID'],

like

 

'pic' => $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file'),

'id' => $this->aFileInfo['medID'],

'width_ext' => $iWidth + 2,

'width' => $iWidth,

and in view_unit.html use __id__ instead of the static id you are using (in red)

 

so much to do....
Quote · 12 May 2012

 

open BxPhotosPageView.php at line 152 add 'id' => $this->aFileInfo['medID'],

like

 

'pic' => $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file'),

'id' => $this->aFileInfo['medID'],

'width_ext' => $iWidth + 2,

'width' => $iWidth,

and in view_unit.html use __id__ instead of the static id you are using (in red)

 

 Have you tested this?!

I'm doing it now to see.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 May 2012

IT WORK'S

A huge thumbs up on this 

I can throw simple stuff around but have no schooling at all in php, just seft taught.

Thanks a million buddy

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 May 2012

I am glad, i could help

so much to do....
Quote · 12 May 2012

That's cool guys!!

Can you post a summery or the full fix of what you did?

Thanks.

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 12 May 2012

change /boonex/modules/photos/templates/base/view_unit.html

<div class="button_wrapper" style="width:100%; center; background-color:#CCFF66 margin: 0;" onclick="window.open('http://www.yoursite.com/m/photos/edit/__id__', '_blank', 'width=500,height=400,menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no') ">    <button class="form_input_submit" type="button">            <img alt="Edit" src="http://www.yoursite.com/templates/base/images/icons/edit.png">            Edit        </button>    </div><div style="width:100%; margin: 0;"><h4 align="center">Site Members, please use the <b>"edit"</b> button above to change the name of your image to what you want..</h4>        </div>

change /modules/boonex/photos/classes/BxPhotosPageView.php

look for line 151

$aUnit = array(            'pic' => $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file'),

make it look this way (your adding 'id' => $this->aFileInfo['medID'],)

$aUnit = array(            'pic' => $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file'),            'id' => $this->aFileInfo['medID'],            'width_ext' => $iWidth + 2,            'width' => $iWidth,

clear your cache

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 May 2012

The button displays for site visitors (non-members).  Some may want that but I would prefer that it be hidden for all but admins and the photo owner.

http://pkforum.dolphinhelp.com
Quote · 12 May 2012

that does not matter to me, if a guest tries to edit, the get the usual "access denied"

for as much as a problem this was causing my members, i could care less about it hidden or not , actually I think it will help I predict my users actually using this new feature

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 May 2012

It's all good.  I added it to my site for evaluation and even tweaked the layout so the button was next to the photo title... but in the end decided I didn't want to have yet another "access denied" link on my site. ;-)

http://pkforum.dolphinhelp.com
Quote · 12 May 2012

That was a short evaluation.. lol

I look at "access denied" as a site plus, when I see that elsewhere, I sign up...

meaning, "curiosity killed the cat" 

"curiosity gained me another member"

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 May 2012

Good point... for some links "Access Denied" is a good teaser for people to sign up... but not for the option to edit someone's photo title... not in my view.

http://pkforum.dolphinhelp.com
Quote · 12 May 2012

 

Good point... for some links "Access Denied" is a good teaser for people to sign up... but not for the option to edit someone's photo title... not in my view.

 True, but this does STICK out when the members actually view the photo and think, "damn why didn't I change that to begin with."

No one looks at the actions block, Dolphin to TOO busy as it is for the casual user, this let's non-members know that is just this easy to change the title.

Maybe Prashank25 will enlighten me on how to hide this from guest and only show for members.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 May 2012

Looks good guys!!!  I guess if we can't remove it then we better give a convenient solution for the users to edit the title and maybe then they'll get used to add the title in the actual upload of the photo.

GOOD JOB!!!

Thanks.

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 13 May 2012

Okay i will post a solution in another thread because this thread is so longgggg. I don't like long thread....:)

You want to hide it from guest and all users who don't own the photo. Am i right?

 

Good point... for some links "Access Denied" is a good teaser for people to sign up... but not for the option to edit someone's photo title... not in my view.

 True, but this does STICK out when the members actually view the photo and think, "damn why didn't I change that to begin with."

No one looks at the actions block, Dolphin to TOO busy as it is for the casual user, this let's non-members know that is just this easy to change the title.

Maybe Prashank25 will enlighten me on how to hide this from guest and only show for members.

 

so much to do....
Quote · 13 May 2012

I have posted a solution here http://www.boonex.com/forums/topic/Edit-button-on-photos-view-page-.htm

so much to do....
Quote · 13 May 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.