Recent Posts

Pages: 1 ... 8 9 [10]
91
osDateEvo Tips & Tricks / Private Albums - some code changes to make it work again
« Last post by arievaul on November 23, 2017, 07:18:37 PM »
Hello,

My understanding of how Private Albums work is as follows:
- the membership level for the member should allow private albums (set by the Administrator)
- in order for a member to allow others to see their private albums, the other member must be on their buddy list or hot list
- album passwords (used in past version of osDate) are no longer used.

However, the functionality does not seem to be currently supported.

Here are the list changes I made to osDateEvo v1.2 and the "default" templates to get this working again:

template/default/usersnap.tpl
1. Unhide the Album selector and remove the password input field.

Change from

Code: [Select]
<div style="width:100%; padding-bottom: 6px; text-align:center; display:none">
<form action="uploadsnaps.php" name="select_album"  method="post">
<input type="hidden" name="type" value="{$type}" />
{lang mkey='album_hdr'}:&nbsp;&nbsp;
<select name="album_id" onChange="this.form.submit();">
{foreach from=$useralbums item=album}
<option value="{$album.id}" {if $album.id==$album_id} selected {/if}>{$album.name|stripslashes}</option>
{/foreach}
</select>
&nbsp;&nbsp;{lang mkey='or'}&nbsp;{lang mkey='addnew'}:&nbsp;
<input name="album_name" size="20" maxlength="30" type="text" class="textinput" />
&nbsp;
{lang mkey='signup_password'}&nbsp;
<input name="album_passwd" type="password" class="textinput" size="12"/>
&nbsp;<input type="submit" name="createalbum" value="{lang mkey='submit'}" class="formbutton" />
</form>
</div>

To

Code: [Select]
<div style="width:100%; padding-bottom: 6px; text-align:center;">
<form action="uploadsnaps.php" name="select_album"  method="post">
<input type="hidden" name="type" value="{$type}" />
{lang mkey='album_hdr'}:&nbsp;&nbsp;
<select name="album_id" onChange="this.form.submit();">
{foreach from=$useralbums item=album}
<option value="{$album.id}" {if $album.id==$album_id} selected {/if}>$album.name|stripslashes}</option>
{/foreach}
</select>
&nbsp;&nbsp;{lang mkey='or'}&nbsp;{lang mkey='addnew'}:&nbsp;
<input name="album_name" size="20" maxlength="30" type="text" class="textinput" />
&nbsp;
&nbsp;<input type="submit" name="createalbum" value="{lang mkey='submit'}" class="formbutton" />
</form>
</div>

template/default/userpicgallery.tpl

2. Hide the password from the other member (note: this works even if the other member leaves the password blank but it is confusing to leave it there). Also, if the member is adding a new Album this template is shown so showing a password is also confusing).

Comment out the following code:
Code: [Select]
{if $albumpasswd > 0 }
{if $smarty.session.UserId != $userid }
&nbsp;&nbsp;&nbsp;
{lang mkey='signup_password'}&nbsp;
<input name="album_passwd" type="password" class="textinput" size="15"/>
{else}
<input name="album_passwd" type="hidden" value='' size="15"/>
{/if}
{/if} *}

uploadsnaps.php

3. The password does not need to be saved (this is optional. It will not affect functionality if not done).

Change from
Code: [Select]
$osDB->query('insert into ! (username, name, passwd) values (?, ?, ?)', array( USERALBUMS_TABLE, $_SESSION['UserName'], $_POST['album_name'], md5($_POST['album_passwd'])) );

To
Code: [Select]
$osDB->query('insert into ! (username, name) values (?, ?)', array( USERALBUMS_TABLE, $_SESSION['UserName'], $_POST['album_name']) );


Admin/showpics.php

4. On the Admin side fix the following bug (this is an actual bug as there is no user id in the USERALBUMS_TABLE).

Change from
Code: [Select]
$albs = $osDB->getAll('select id, name from ! order by name', array( USERALBUMS_TABLE ) );

To
Code: [Select]
$albs = $osDB->getAll('select ua.id as id, ua.name as name from ! ua, ! u where u.id = ? and u.username = ua.username order by ua.name', array( USERALBUMS_TABLE, USER_TABLE, $_REQUEST['userid'] ) );


template/default/Admin/userpics.tpl

5. Hide the password field on the page

Change from
Code: [Select]
<td >{lang mkey='album_hdr'}:&nbsp;&nbsp;
<select name="album_id">
{foreach from=$useralbums item=album}
<option value="{$album.id}" {if $album.id== $data[$smarty.section.sec.index].album_id} selected {/if}>{$album.name|stripslashes}
</option>
{/foreach}
</select>
&nbsp;&nbsp;{lang mkey='or'}&nbsp;{lang mkey='addnew'}:&nbsp;
<input name="album_name" size="12" maxlength="25" type="text"  class="textinput"/>
&nbsp;
{lang mkey='signup_password'}&nbsp;
<input name="album_passwd" type="password" class="textinput" size="12"/>
{if $data[$smarty.section.sec.index].picture ne ''} &nbsp;<input type="submit" name="changealbum" value="{lang mkey='change_album'}" class="formbutton"/>
{/if}
</td>

To
Code: [Select]
<td >{lang mkey='album_hdr'}:&nbsp;&nbsp;
<select name="album_id">
{foreach from=$useralbums item=album}
<option value="{$album.id}" {if $album.id== $data[$smarty.section.sec.index].album_id} selected {/if}>{$album.name|stripslashes}
</option>
{/foreach}
</select>
&nbsp;&nbsp;{lang mkey='or'}&nbsp;{lang mkey='addnew'}:&nbsp;
<input name="album_name" size="12" maxlength="25" type="text"  class="textinput"/>
&nbsp;
{if $data[$smarty.section.sec.index].picture ne ''} &nbsp;<input type="submit" name="changealbum" value="{lang mkey='change_album'}" class="formbutton"/>
{/if}
</td>


Admin/saveuserpics.php

6. Password does not need to be saved (optional)

Change from
Code: [Select]
$osDB->query('insert into ! (username, name, passwd) values (?, ?, ?)', array( USERALBUMS_TABLE, $userinfo['username'], $_POST['album_name'], md5($_POST['album_passwd'])) );

To
Code: [Select]
$osDB->query('insert into ! (username, name) values (?, ?)', array( USERALBUMS_TABLE, $userinfo['username'], $_POST['album_name']) );


I am not really sure why this functionality was disabled - so perhaps I am missing a use case / test case. However, the functionally on the default installation with the default template seem to be working again for me.

Good luck.
92
Hi all,

Sorry this is taking a lot longer than I was thinking it would.
93
osDateEvo Updated Files - Fixed Bugs / Re: osDateEvo v1.2 admin/viewmyblog.php fix
« Last post by Pharg on November 19, 2017, 10:07:07 PM »
Hi Manset,

Thanks for the bug find.
94
osDateEvo Updated Files - Fixed Bugs / osDateEvo v1.2 admin/viewmyblog.php fix
« Last post by manset on November 19, 2017, 09:29:00 PM »
Open admin/viewmyblog.php
find this code:
Code: [Select]
if ( isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['delete']) && $_GET['delete'] == 'Y'  ) {

      $blog->deleteComment($_REQUEST['deleteid'], $_SESSION['AdminId']);

change with this code:
Code: [Select]
if ( isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['delete']) && $_GET['delete'] == 'Y'  ) {

      $blog->admindeleteComment($_REQUEST['deleteid'], $_SESSION['AdminId']);
95
Hello Members,

I am currently rewriting the language files for osDateEvo v1.2 and will post them within a week.

I will also try to explain in better detail what people have been doing wrong with the translation process and what
files are needed to be translated / converted and what have been missed in the past.

96
Addons & Modules / Re: OsdateEvo Turkish Language
« Last post by Pharg on November 14, 2017, 10:19:39 PM »
Hi Manset,

Try using this lang_main.php and profile_questions.php for the Turkish language.
97
Addons & Modules / Re: OsdateEvo Turkish Language
« Last post by Pharg on November 14, 2017, 09:47:02 PM »
Hi Manset,

Thank you for the language translation for Turkish :)

There are a few other lang files that might need checking.
In the languages there is the profile_questions.php

There are also languages in all the Plugins, thought I better let you know.
98
Addons & Modules / OsdateEvo Turkish Language
« Last post by manset on November 14, 2017, 08:23:03 PM »
Turkish Language download
99
Addons & Modules / Re: [FREE] Friends Mod - CBG
« Last post by Pharg on November 13, 2017, 08:13:26 PM »
Hi lenzen24,

It must have gotten corrupted at some stage, this is what is missing.

Code: [Select]
{if $ccount==4}
<div style="clear:both;"></div>
</div>
{/if}
{math equation="$ccount+1" assign="ccount"}
{math equation="$ccount%5" assign="ccount"}
{/foreach}
{if $ccount>0}
<div style="clear:both;"></div>
</div>
{/if}
</div>
</div>
<br />
{/if}
{/strip}

I found so more errors so I have updated the mod, please download again.
100
Addons & Modules / Re: [FREE] Friends Mod - CBG
« Last post by lenzen24 on November 13, 2017, 03:59:54 PM »
Hi,
i have tested the 1.2 version of the mod, but the templates files are uncompleted in the downlaod.
can anyone post the full template files please?

as an example: this is the friends.tpl
Quote
{if $ccount==4}
                                                <div style="clear:both;"></div>
                                        </div>
                                {/if}
                                        {math
Pages: 1 ... 8 9 [10]