Gallery and own upload folder and reselect images?

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Re: Gallery and own upload folder and reselect images?

Postby rabbeltje » Thu Oct 01, 2009 11:17 am

Harm10 wrote:
rabbeltje wrote:*edit: solved it! the error was caused by this part:
Code: Select all
[[gallery popup="fancybox"]]


i left that part out and just used the rest of your code and it works wonderfully! thanks a million!

This parm was introduced by one of the recent revisions (http://pivot-weblog.svn.sourceforge.net/viewvc/pivot-weblog?view=rev&revision=2150)to bypass the comment popup line when using gallery on pages. So you better upgrade to that level I think.
Look at this discussion: http://forum.pivotx.net/viewtopic.php?f=13&t=1042&start=10


didn't realise that! thanks for pointing it out :)
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: Gallery and own upload folder and reselect images?

Postby rabbeltje » Tue Oct 06, 2009 8:19 am

could it be that this causes a problem when uploading an image using the pivotx-image button? each time i try to upload an image it does this:

i get a whole bunch of html-code in the field for image-name after i try to upload it.

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl"> <head>            <link rel="shortcut icon" href="/pivotx/pics/favicon.ico" />     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>     <meta name="robots" content="noindex, nofollow" />      <title>PivotX &raquo;          Uitloggen</title>      <!-- jquery and the likes -->     <script src="includes/js/jquery.js" type="text/javascript"></script>     <script src="includes/js/jquery-ui.js" type="text/javascript"></script>     <script src="includes/js/jquery-plugins.js" type="text/javascript"></script>     <link rel="stylesheet" href="templates_internal/ui-theme/jquery-ui.css" type="text/css" />               <!-- Markitup -->     <link rel="stylesheet" type="text/css" href="includes/markitup/markitup.css" />     <script src="includes/markitup/jquery.markitup.js" type="text/javascript"></script>     <script src="includes/markitup/set.js" type="text/javascript"></script>      <!-- Thickbox -->     <script src="includes/js/thickbox.js" type="text/javascript"></script>     <link rel="stylesheet" href="templates_internal/assets/thickbox.css" type="text/css" />      <!-- Formclass library -->     <link rel="stylesheet" type="text/css" href="templates_internal/assets/formclass.css" />      <!-- Pivot -->     <script src="includes/js/pivotx.js" type="text/javascript"></script>     <link rel="stylesheet" type="text/css" href="templates_internal/assets/pivotx.css"/>     <!--[if lte IE 7]>         <link rel="stylesheet" type="text/css" href="templates_internal/assets/pivotx_ie.css"/>     <![endif]-->        </head>  <body>        <div id="header">           <div id="logo">         <a href="/pivotx/index.php"><img src="templates_internal/assets/pivotx.png" alt="PivotX" /></a>     </div>                 <div id="sitenamediv">         <a href="/">rabbeltje</a>     </div>                 <div id="usermenu">                     Welkom, onbekende gebruiker.            </div>                 <!-- main menu -->               <ul id="mainmenu" class="sf-menu sf-navbar">                                                                        <li >                 <a href="?page=login"><span>Inloggen</span></a>                 <ul>                                 </ul>             </li>                                        </ul>      <!-- end of main menu -->        </div>   <div id="content">                          <h1>             Uitloggen                                 </h1>                                                   <script type="text/javascript">     //<![CDATA[          $(document).ready(function(){                 humanMsg.displayMsg("Je bent nu uitgelogd uit PivotX");             });     //]]>     </script>          <div id="container">       <div class="homeleftcolumn">                       <form  enctype="multipart/form-data"  name="login" id="login" action="index.php?page=login" method="post"> <fieldset style="display: none">     <input name="returnto" id="returnto" type="hidden" value="" /> </fieldset> <table border="0" cellspacing="0" cellpadding="4" class="formclass"> <tr>     <td valign="top">         <label for="username">Gebruikersnaam <span class="required">*</span></label>     </td>     <td valign="top">         <input name="username" id="username" class="%class% " type="text" value="" size="20" style="%style%" tabindex="500"  />             </td>     <td>        <span class='formInfo'><a href='#' class='jTip' name='Gebruikersnaam'         rel='Gebruikersnamen kunnen slechts alphanumerieke tekens (a-z, A-Z, 0-9) en underscores (_) bevatten.' id='tip_gebruikersnaam'><img src='pics/information.png' width='16' height='16' alt='i' /></a></span> <noscript>Gebruikersnamen kunnen slechts alphanumerieke tekens (a-z, A-Z, 0-9) en underscores (_) bevatten.</noscript>      </td> </tr>  <tr>     <td valign="top">         <label for="password">Wachtwoord <span class="required">*</span></label>     </td>     <td valign="top">         <input name="password" id="password" type="password" class="" value="" size="20"  style="%style%" tabindex="501" />             </td>     <td>             </td> </tr>  <tr>     <td valign="top">         <label for="login_stayloggedin">Blijf ingelogd? </label>     </td>     <td valign="top">         <input type="checkbox" name="stayloggedin" value="1"  id="login_stayloggedin"               class="noborder" tabindex="502" />             </td>     <td>             </td> </tr>  <tr>      <td class="buttons" colspan="3">         <button type="submit" tabindex="503" class="positive">             <img src="./pics/tick.png" alt="" />             <span class="text">Inloggen</span>         </button>     </td>  </tr>  <tr><td colspan='3'><hr  noshade='noshade' size='1' /></td></tr>         <tr><td colspan='3'><h3 style='margin: 0;'>Wachtwoord vergeten?</h3></td></tr>         <script type='text/javascript'>         $(document).ready(function(){             // Attach event for 'cancel' button.             $('#login_resetpassword').click(function(event, data, formatted) {                 if ($('#login_resetpassword:checked').val()) {                     $('#password').attr('readonly', 'readonly').addClass('dim').val('******');                     $('#login_stayloggedin').attr('disabled', 'disabled');                     $('form#login').find('button').children('span.text').html('Stuur wachtwoord');                     $('#login_stayloggedin')                 } else {                     $('#password').attr('readonly', '').removeClass('dim').val('');                     $('#login_stayloggedin').attr('disabled', '');                     $('form#login').find('button').children('span.text').html('Inloggen');                 }             });          });         </script>    <tr>     <td valign="top">         <label for="login_resetpassword">Reset wachtwoord </label>     </td>     <td valign="top">         <input type="checkbox" name="resetpassword" value="1"  id="login_resetpassword"               class="noborder" tabindex="505" />             </td>     <td>        <span class='formInfo'><a href='#' class='jTip' name='Reset wachtwoord'         rel='Als je je wachtwoord vergeten bent, vul dan je inlognaam en e-mailadres in. PivotX stuurt dan je wachtwoord aan het opgegeven adres.' id='tip_reset-wachtwoord'><img src='pics/information.png' width='16' height='16' alt='i' /></a></span> <noscript>Als je je wachtwoord vergeten bent, vul dan je inlognaam en e-mailadres in. PivotX stuurt dan je wachtwoord aan het opgegeven adres.</noscript>      </td> </tr>  </table> </form> <script type='text/javascript'> jQuery().ready(function() {    jQuery('#login').validate({       event: 'keyup',       rules : {           'username': { required:true, minlength:2, maxlength:20 },          'password': { required:true, minlength:4, maxlength:20 }       },        messages : {           'username': "Dat is geen goede inlognaam!",          'password': "Geef een goed wachtwoord!"       }      }); }); </script>       </div>      <div class="homerightcolumn">               </div>       <div class="cleaner">&nbsp;</div>  </div><!-- end of 'container' -->      <br />     <br />       </div><!-- end of 'content' -->    <br />   <div id="footer">           <small>          6 Oktober '09 - 10:11                      - <a href="modules/module_debug.php#bottom" onclick="void(debugwin = window.open('modules/module_debug.php#bottom', 'debugwin', 'status=yes, scrollbars=yes, resizable=yes, width=700, height=300')); return false;">Bekijk Debug uitvoer</a>             - <span class='timetaken'>0.430</span> sec., 5.8 mb             - met gebruik van mysql db            - 3 opdrachten            - build #2054-5.              </small>      <em>PivotX - 2.0.1 - RC</em> &nbsp; - &nbsp; &copy; 2009, <a href="http://www.pivotx.net">Het PivotX Team</a>         - <a href="index.php?page=about">Over</a>.       </div><!-- end of 'footer' -->     </body>  </html>


(yeah, it's a lot, i know...) i think it's the html for the page i am on that moment. what i also noticed is that it kept logging me out of pivotX.

i did not yet upgrade to the later version, but i don't think it has anything to do with that, does it? i mean, i never had this problem before.


*edit* i found the answer to the problem: yes this causes a problem. i've re-installed all files and my problem is gone. which is a pity really because i liked to have these pretty names. is there any other way that doesn't give me the following problem??
Last edited by rabbeltje on Wed Oct 07, 2009 6:33 am, edited 1 time in total.
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: Gallery and own upload folder and reselect images?

Postby hansfn » Tue Oct 06, 2009 10:56 am

The question here is really how you did the upgrade. It's extremely likely to break your PivotX install if you grab the complete files from a revision ...
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Gallery and own upload folder and reselect images?

Postby rabbeltje » Tue Oct 06, 2009 12:12 pm

i didn't upgrade. i re-installed, using the file pivotx.net gives me, which is the one i had installed before i made the nice-name-changes.
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: Gallery and own upload folder and reselect images?

Postby hansfn » Tue Oct 06, 2009 2:22 pm

Code: Select all
yes this causes a problem

So what exactly is this comment pointing to?

PS! If you are happy, then we can just stop this discussion ;-)
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Gallery and own upload folder and reselect images?

Postby rabbeltje » Wed Oct 07, 2009 6:30 am

the comment is pointing to the problem described below. i edited and put it at the top, maybe would have been better at the end of the message.

i'm always happy ;) i would have liked to have the nice names displayed in my galleries but it obviously causes some problems that are REALLY annoying, so i'd prefer to have dodgy filenames and a working install (but it would REALLY make me happy if i had nice names AND a working install). anyway, wanted to point it out in case other people were going to try this so they would know it causes a problem.
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: Gallery and own upload folder and reselect images?

Postby Harm10 » Wed Oct 07, 2009 5:10 pm

For what's worth: I'm on revision level 2150 and together with the described changes by me everything works fine with nice filenames showing!
I got the feeling you have to analyze the way you installed the trunk to get to the reason of your problems...... :(
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Gallery and own upload folder and reselect images?

Postby rabbeltje » Thu Oct 08, 2009 6:29 am

Harm10 wrote:I got the feeling you have to analyze the way you installed the trunk to get to the reason of your problems...... :(


not sure what you mean by that... but anyway, i've decided i'm just going to leave it as it is now and wait for the next 'official' release. it's working now and unfortunatly i don't have the time to try each different revision at the moment. if i had, i'd definatly try but i prefer the working version for the moment ;)
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: Gallery and own upload folder and reselect images?

Postby hansfn » Thu Oct 08, 2009 2:13 pm

Revison 2159:

Code: Select all
Introduced the function formatFilename and used it to support
the replacement "%nicefilename%" in the gallery extension. Thx, Harm10.


Are there other places where we should support "%nicefilename%"? I see you mention captions here and there - be specific?

When it comes to a separate folder for galleries, that is doable but someone must write the code for an extension admin page (so you can set the folder name) and I don't have time ...
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Gallery and own upload folder and reselect images?

Postby Harm10 » Thu Oct 08, 2009 5:53 pm

hansfn wrote:Are there other places where we should support "%nicefilename%"? I see you mention captions here and there - be specific?

Thanks for implementing this function officially! :mrgreen:
As you've read I used it in hook_gallery.php.
I also use it in snippet_media.php in the media extension. For the audioplayer- and video-part I've created an annotation above the linked file so you can see what the filename is before you click the link. I don't know whether you want that one official because the way the players are shown within the page is also in there and not in the templatepages. So there's currently no way in that you can specify whether you want this annotation or not.
As you lack time right now maybe this is something for the future?
This is the coding I use in snippet_media.php for the audioplayer (the <div> is new):
Code: Select all
$media_config['audioplayer'] = <<< EOM
<div id="mediafileinfo">
    <p>%nicefile%</p>
</div>
And this in the function smarty_media_audio in the same php file (last line is new)
Code: Select all
$output = str_replace('%basename%', $basename, $output);
$output = str_replace('%filename%', $filename, $output);
$output = str_replace('%mediaplayerpath%', $mediaplayerpath, $output);
$output = str_replace('%counter%', $count, $output);
$output = str_replace('%description%', $basename, $output);
$output = str_replace('%nicefile%', formatfilename($basename), $output);
If you're hinting for someone else to try and write the code......... I can have a look but I'm also quite busy at the moment....... maybe in several phases (another map for the upload / make selection out of already existing files)? I also have to get acquainted with the structure of those pages. But maybe someone else wants to have a go?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

PreviousNext

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 2 guests

cron