Hi,
I'm looking to make a link so a user can just upload a photo to their default album and bypass the multiple pages currently needed to upload a photo( discussed here: http://www.boonex.com/unity/forums/?action=goto&topic_id=After-creating-an-Album-why-is-there-no-option-to-upload-photos- ). I would think it would look something like this:
=m/photos/albums/my/add_objects/{0}-s-photos/owner/{0}
Thanks,
Alan
|
well you might think that would work but it doesn't this link will just make a folder with {0} in the title good luck
happy thoughts
|
You can accomplish this by creating a custom PHP block. If you install the Deanos Tools module, there's an interface to insert a PHP block. Basically the script will render an HTML link that will take the user right to the page with the uploader. You can then place the block on your pages in Builder -> Pages Blocks. Let me know know if this is what you're trying to do and I'll give you the code you'll need to insert. Good luck. |
yes you can place link via new block and reassigning that block in sql with html design 4 html but the php code that generates link in original php block is built in php code but it will not generate html code to link to each users <nickname> and the like do not genarate in addy bar so you have to give nearest target link which is folder upload page
?> <div class="paginate"> <div class="view_all" style="background-image:url(__img_src__)"> <a href="__lnk_url__" title="__lnk_title__">__lnk_content__</a> </div> </div> <?
if you can translate this into a html link code that takes you to each users photo uploads and creates a default photos folder that will place users photo on to users profile photos block please tell me how :O) there is now a ticket for this issue
ps once the picture is uploaded to profile photo on profile the upload link is covered by the photo :O0
|
Hi,
I'm looking to make a link so a user can just upload a photo to their default album and bypass the multiple pages currently needed to upload a photo( discussed here: http://www.boonex.com/unity/forums/?action=goto&topic_id=After-creating-an-Album-why-is-there-no-option-to-upload-photos- ). I would think it would look something like this:
=m/photos/albums/my/add_objects/{0}-s-photos/owner/{0}
Thanks,
Alan
PHP code to do that.
$sNickName = getNickName((int)$_COOKIE['memberID']); $sLink = '<a href="m/photos/albums/my/add_objects/{$sNickName}-s-photos/owner/{$sNickName}">Upload photos to default photo album</a>';
https://www.deanbassett.com |
Thanks for the help. Deano I have a number of your mods, including your Block Tools, so I'll try that.
|
Thanks for the help. Deano I have a number of your mods, including your Block Tools, so I'll try that.
One piece of that code is missing. Here is the corrected code.
$sNickName = getNickName((int)$_COOKIE['memberID']); $sLink = '<a href="m/photos/albums/my/add_objects/{$sNickName}-s-photos/owner/{$sNickName}">Upload photos to default photo album</a>'; echo $sLink;
Make sure the block you create is visible only to members. This code does not have guest checking or any other things built in. It's just an example.
https://www.deanbassett.com |
It's so close. After uploading a photo it goes to an album called {$sNickName}-s-photos . Here's what the link looks like:
http://www.etalentshowcase.com/dolphin704/m/photos/browse/album/-sNickName-s-photos/owner/
|
the code above is for adding to a new php block .. try this for html link it takes users to there album page they still have to select the album to upload to but this link can be placed in the top of photos block on profile page m/photos/albums/my/add_objects
happy thoughts
|
Ok. Lets try this code instead.
$sNickName = getNickName((int)$_COOKIE['memberID']); $sLink = '<a href="m/photos/albums/my/add_objects/' . $sNickName . '-s-photos/owner/' . $sNickName . '">Upload photos to default photo album</a>'; echo $sLink;
https://www.deanbassett.com |
As a quick link function it's pretty cool.
To integrate as a Icon or Menu item you have to creat into root some PHP code like this:
require_once( 'inc/header.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' ); $sNickName = getNickName((int)$_COOKIE['memberID']); $sLink = '/m/photos/albums/my/add_objects/' . $sNickName . '-s-photos/owner/' . $sNickName .''; header('Location: '.$sLink.'');
Than you have to create a box item calling your function and it works only within the owner "default" album only.
Even integration as a buttom works and you can place everywhere you want.
it works equally for the videos as well, for that just change "photos" to "videos"
Cheers
Sleepless |
Hello deano I placed this code in a php block that was made with your tools mod (i am not saying its your tools ) I placed it on profile page but this just made the page redirect to the upload page straight away with no chance of opening the profile page if you have the time could you please tell me what i am doing wrong
Happy thoughts
ps it doesn't have to be deano anyone that can provide a solution to this please chip in :O)
|
Try this:
$iMemberID = getLoggedID();
$iProfileID = getID( $_GET['ID'] );
$sMemNickName = getNickName();
$sLink = '<br/><a href=m/photos/albums/my/add_objects/' . $sMemNickName . '-s-photos/owner/' . $sMemNickName . '>Upload Photos to Default Album</a>';
if ($iMemberID == $iProfileID)
{
echo $sLink;
}
|
Hello guys, Im struggling with this one a bit. I want to add a menu tab to upload a photo also include the quick link. I have managed to create a block on my account page using deanos tools. It works great only i would now prefer to have a menu tab/link
could someone post a idiots quide?
Thanks
|