Author Topic: [MOD-Request] Upload link in user_logininfo.html  (Read 13097 times)

0 Members and 1 Guest are viewing this topic.

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
[MOD-Request] Upload link in user_logininfo.html
« on: April 16, 2003, 06:20:01 PM »
I need an upload link in user_logininfo.html.  :wink:
Upload Images

Must change member_uploadform.html adding a category_dropdown_upload.html where members can select the correct category to upload their images.

 :arrow: But only must show categories for registered members, not all ( admins galleries ).

Thanks.

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
[MOD-Request] Upload link in user_logininfo.html
« Reply #1 on: April 24, 2003, 10:46:01 PM »
Nobody can help me doing this MOD ?   :(

I believe that it can be useful for many in the forum  :?

Offline Apollo13

  • Addicted member
  • ******
  • Posts: 1.093
    • View Profile
[MOD-Request] Upload link in user_logininfo.html
« Reply #2 on: April 24, 2003, 11:21:33 PM »
well i have such a thing running on my site. But at the moment i'm working on my site. But if i found the code i'll post it....

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD-Request] Upload link in user_logininfo.html
« Reply #3 on: April 25, 2003, 12:16:47 AM »
well, first I think u'll need copy part started with if ($action == "uploadimage") { ... } from member.php to page_header.php
second, how do u want handle when image was uploaded? do u want kick user from the page he was on to "details" of new image page? 8O
how about error handling? with all this it will be hard to make correct clickstream if something went wrong so user could easily come back to the page he was on before.
maybe it would easier for users have dropdown menu for avalable categories and after chosing one it would open upload page?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
[MOD-Request] Upload link in user_logininfo.html
« Reply #4 on: April 25, 2003, 11:39:47 AM »
An example (you must register until) in http://www.deviantart.com/submit/  :?

I don´t invent anything only I say what already I have seen  :oops:

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
Bild Upload
« Reply #5 on: April 29, 2003, 11:53:04 AM »
Cr@zy Sash,

Quote from: Cr@zy Sash
well i have such a thing running on my site. But at the moment i'm working on my site. But if i found the code i'll post it....

You can post the code please...

http://crazy-pics.de.vu/
Service / Uload / Bild Upload / Kategorie (category_dropdown)  :D

Offline Apollo13

  • Addicted member
  • ******
  • Posts: 1.093
    • View Profile
[MOD-Request] Upload link in user_logininfo.html
« Reply #6 on: April 29, 2003, 12:02:12 PM »
well i do this manually. But i think there must be a function 2 read out all categories. Well I try 2 do something and than i post it ok...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Bild Upload
« Reply #7 on: April 29, 2003, 12:56:23 PM »
Quote from: Xwall
Service / Uload / Bild Upload / Kategorie (category_dropdown)  :D

this can be done just pointing to member.php?action=uploadform
category dropdown will be generated from all avalable categoryes with upload permission.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
Al final
« Reply #8 on: April 30, 2003, 05:32:10 PM »
Bueno lo que he hecho es una chapuza pero que se la va hacer  :lol:

Well i do this manually like Cr@zy Sash.  :(

This is a doubt no is a manual to make it.

A doubt to do it better
in includes/page_header.php i add after "url_upload"

Code: [Select]
"url_upload1" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform1"),

To make works this in member.php i must find

Code: [Select]
if ($action == "uploadform") {
.
.
.
  $content = $site_template->parse_template("member_uploadform");
}


and paste after

Code: [Select]
if ($action == "uploadform1") {
.
.
.
  $content = $site_template->parse_template("member_uploadform1");
}


I think this badly done but works well , suggestions???
of course member_uploadform1 is member_uploadform1.html (new template)
This template must have sometihig like this:
 
 
Code: [Select]
<select name="cat_id" style="background-color: #CCCCCC; font-size: 11px;" id="cat_id">
                    <option value="15" class="row3">Arte Digital - 3D</option>
                    <option value="16" class="row3">Arte Digital - Abstracto</option>
                    <option value="161" class="row3">Arte Digital - Erótico</option>
                    <option value="26" class="row3">Arte Digital - Estilo Libre</option>
                    <option value="18" class="row3">Arte Digital - Luminoso</option>
                  </select>


<select name="cat_id" id="cat_id"> is the key, because in member_uploadform.html (id="cat_id") is a hidden field.

Excuses for my poor english  :oops:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD-Request] Upload link in user_logininfo.html
« Reply #9 on: April 30, 2003, 06:13:22 PM »
I think it should be if ($action == "uploadform") {

U dont have to do it manualy.
first off all, if u allowed upload only for register users (none of the categories has permission for guests), u can use this:
Code: [Select]
function get_category_dropdown_upload() {
  global $lang, $drop_down_cat_cache, $cat_parent_cache;
  $category = "\n<select name=\"cat_id\" class=\"categoryselect\">\n";
  $category .= "<option value=\"0\">".$lang['select_category']."</option>\n";
  $category .= "<option value=\"0\">-------------------------------</option>\n";

  $drop_down_cat_cache = array();
  $drop_down_cat_cache = $cat_parent_cache;
  $category .= get_category_dropdown_bits_upload(0);
  $category .= "</select>\n";
  return $category;
}
function get_category_dropdown_bits_upload($cat_id = 0, $cid = 0, $depth = 1) {
  global $site_db, $drop_down_cat_cache, $cat_cache;

  if (!isset($drop_down_cat_cache[$cid])) {
    return "";
  }
  $category_list = "";
  foreach ($drop_down_cat_cache[$cid] as $key => $category_id) {
    if (check_permission("auth_upload", $category_id)) {
      $category_list .= "<option value=\"".$category_id."\"";
      if ($cat_id == $category_id) {
        $category_list .= " selected=\"selected\"";
      }
      if ($cat_cache[$category_id]['cat_parent_id'] == 0) {
        $category_list .= " class=\"dropdownmarker\"";
      }

      if ($depth > 1) {
        $category_list .= ">".str_repeat("--", $depth - 1)." ".$cat_cache[$category_id]['cat_name']."</option>\n";
      }
      else {
        $category_list .= ">".$cat_cache[$category_id]['cat_name']."</option>\n";
      }
      $category_list .= get_category_dropdown_bits_upload($cat_id, $category_id, $depth + 1);
    }
  }
  unset($drop_down_cat_cache[$cid]);
  return $category_list;
}

then, register it in the template:
Code: [Select]
"cat_dropdown" => get_category_dropdown_upload(),
then in the template u can use {cat_dropdown}
I havent test it ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline neverkas

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
    • FullPosteo
Re: [MOD-Request] Upload link in user_logininfo.html
« Reply #10 on: July 24, 2009, 12:10:14 AM »
Thank you V@no it works very well..!
I want to ask you a question.

I want that the menu of the selection to disappear
http://www.fullposteo.com.ar/member.php?action=uploadform&cat_id=7

I want that the menu of the selection to appear (display)
http://www.fullposteo.com.ar/member.php?action=uploadform
« Last Edit: July 24, 2009, 03:05:06 AM by neverkas »
http://www.fullposteo.com.ar/



La nueva forma de compartir tus fotos y vídeos con tus amigos!

The new form to share photos and videos width your friends!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD-Request] Upload link in user_logininfo.html
« Reply #11 on: July 24, 2009, 03:17:32 AM »
Apparently I just answered to you in another post:
Mod? Help :)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline CorFie

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: [MOD-Request] Upload link in user_logininfo.html
« Reply #12 on: October 16, 2009, 08:42:04 AM »
Sorry for question:

Can you give it in a complett mod?
cause I like to get something like this to, but I've got problems with the realization.

What I have to do first and what then?