SMFHacks.com
SMFHacks
Community Suite
SMF Gallery Pro
SMF Store
SMF Classifieds
Newsletter Pro
Downloads System Pro
Ad Seller Pro
Hacks and Mods
Latest SMF Hacks
TopTen Hacks
Styles and Themes
Add a Hack
Manage Hacks
Earn Money from Your Forum with these tips
SMF Theme Generator
SMF Package Parser
Free SMF Hosting
HostRocket Webhosting for SMF
Site Showcase
Search Forums
Advanced search
User
Welcome,
Guest
. Please
login
or
register
.
May 25, 2012, 12:26:24 pm
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Stats
Members
Total Members: 10073
Latest:
makablue
Stats
Total Posts: 28694
Total Topics: 4979
Online Today: 88
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 53
Total: 53
SMFHacks.com
Forum
SMF Gallery Lite
SMF Gallery Lite
Quick upload to SMF gallery (TP Block)
0 Members and 2 Guests are viewing this topic.
« previous
next »
Pages:
[
1
]
Author
Topic: Quick upload to SMF gallery (TP Block) (Read 9614 times)
edwardsiow
Newbie
Offline
Posts: 10
Quick upload to SMF gallery (TP Block)
«
on:
March 14, 2007, 02:26:07 am »
i would like to request left/right side TP block code which i can use it to upload a picture to smf gallery without going into gallery itself...
Attached image is a sample snapshots (i draw myself)
title and file must be inserted before upload can be done..
thanks for kind programmers who willing to help me....
your help is much appreciate...thanks
example.jpg
(8.46 KB, 172x299 - viewed 708 times.)
Logged
Jpg
Newbie
Offline
Posts: 25
I love cats they taste like chicken!!
Re: Quick upload to SMF gallery (TP Block)
«
Reply #1 on:
March 16, 2007, 02:48:20 pm »
Did it just for you...cause I recently learned how the forms work...but thank you I have a new code to lay back on my foundation when editing the profile.
Code:
global $scripturl, $modSettings, $db_prefix, $txt, $context, $settings, $boarddir;
// gallery.index.php is not loaded yet, so load it here
require_once($boarddir.'/Themes/default/languages/Gallery.english.php');
// text area tag var
$ta_tag = "TEXTAREA";
//Get the category
@$cat = (int) $_REQUEST['cat'];
// display the block info
echo '
<div class="tborder">
<form method="POST" enctype="multipart/form-data" name="picform" id="picform" action="' . $scripturl . '?action=gallery&sa=add2">
<table border="0" cellpadding="0" cellspacing="0" width="95%" height="129">
<tr class="catbg">
<td class="smalltext" width="50%" colspan="1" height="19" align="left"><b>Quick Upload</b></td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><b>Title:</b><br /><input type="text" name="title" size="15" /></td>
</tr>
<tr class="windowbg2">
<td class="smalltext" align="left"><b>Category</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><select name="cat">';
// get our query results to create select box
$dbresult = db_query("SELECT ID_CAT, title FROM {$db_prefix}gallery_cat ORDER BY roworder ASC", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($dbresult)){
echo '
<option value="' . $row['ID_CAT'] . '" ' . (($cat == $row['ID_CAT']) ? ' selected="selected"' : '') .'>' . $row['title'] . '</option>';
}
echo '
</select>
</td>
</tr>
<tr class="windowbg2">
<td class="smalltext" align="left"><b>Description:</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><'.$ta_tag.' name="description" rows="6" cols="16"></'.$ta_tag.'></td>
</tr>
<tr class="windowbg2">
<td class="smalltext" align="left"><b>Keywords:</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><input type="text" name="keywords" maxlength="100" size="15" /></td>
</tr>
<tr class="windowbg2">
<td class="smalltext" align="left"><b>' . $txt['gallery_form_uploadpic'] . '</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><input type="file" size="12" name="picture" /></td>
</tr>';
if(!empty($modSettings['gallery_commentchoice'])){
echo '
<tr class="windowbg2">
<td class="smalltext" align="left"><b>' . $txt['gallery_form_additionaloptions'] . '</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><input type="checkbox" name="allowcomments" checked="checked" /><b>Allow Comments</b></td>
</tr>';
}
echo '
<tr class="windowbg2">
<td class="smalltext" width="28%" colspan="2" height="26" align="left" class="windowbg2"><input type="submit" value="Add Picture" name="submit" /></td>
</tr>
</table><br />
';
if(!allowedTo('smfgallery_autoapprove'))
echo $txt['gallery_form_notapproved'];
echo '
</form>
</div>';
box.jpg
(12.2 KB, 170x330 - viewed 711 times.)
«
Last Edit: March 24, 2007, 12:32:05 pm by Jpg
»
Logged
edwardsiow
Newbie
Offline
Posts: 10
Re: Quick upload to SMF gallery (TP Block)
«
Reply #2 on:
March 18, 2007, 09:32:43 am »
thank you for your kindness....
i will try it out now and report back to you later....
thanks a lot!
Logged
edwardsiow
Newbie
Offline
Posts: 10
Re: Quick upload to SMF gallery (TP Block)
«
Reply #3 on:
March 18, 2007, 09:36:37 am »
it's work absolutely fine and great!!!
nice to meet you...
Logged
Jpg
Newbie
Offline
Posts: 25
I love cats they taste like chicken!!
Re: Quick upload to SMF gallery (TP Block)
«
Reply #4 on:
March 18, 2007, 11:44:48 am »
Glad you like it.
If you have any problems just tell me...
And nice to meet you too.
Logged
Jpg
Newbie
Offline
Posts: 25
I love cats they taste like chicken!!
Re: Quick upload to SMF gallery (TP Block)
«
Reply #5 on:
March 20, 2007, 11:10:17 pm »
Updated the code.
Logged
RWL
Full Member
Offline
Posts: 100
Re: Quick upload to SMF gallery (TP Block)
«
Reply #6 on:
March 23, 2007, 07:36:40 am »
Hi Jpg,
Great code but it wont fit into a side block for me - see attached.
Regards,
Wilsy.
s_shot.png
(39.26 KB, 470x574 - viewed 717 times.)
Logged
RewindLancs.com Management
Jpg
Newbie
Offline
Posts: 25
I love cats they taste like chicken!!
Re: Quick upload to SMF gallery (TP Block)
«
Reply #7 on:
March 24, 2007, 12:31:44 pm »
Code:
global $scripturl, $modSettings, $db_prefix, $txt, $context, $settings, $boarddir;
// gallery.index.php is not loaded yet, so load it here
require_once($boarddir.'/Themes/default/languages/Gallery.english.php');
// text area tag var
$ta_tag = "TEXTAREA";
//Get the category
@$cat = (int) $_REQUEST['cat'];
// display the block info
echo '
<div class="tborder">
<form method="POST" enctype="multipart/form-data" name="picform" id="picform" action="' . $scripturl . '?action=gallery&sa=add2">
<table border="0" cellpadding="0" cellspacing="0" width="95%" height="129">
<tr class="catbg">
<td class="smalltext" width="50%" colspan="1" height="19" align="left"><b>Quick Upload</b></td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><b>Title:</b><br /><input type="text" name="title" size="15" /></td>
</tr>
<tr class="windowbg2">
<td class="smalltext" align="left"><b>Category</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><select name="cat">';
// get our query results to create select box
$dbresult = db_query("SELECT ID_CAT, title FROM {$db_prefix}gallery_cat ORDER BY roworder ASC", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($dbresult)){
echo '
<option value="' . $row['ID_CAT'] . '" ' . (($cat == $row['ID_CAT']) ? ' selected="selected"' : '') .'>' . $row['title'] . '</option>';
}
echo '
</select>
</td>
</tr>
<tr class="windowbg2">
<td class="smalltext" align="left"><b>Description:</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><'.$ta_tag.' name="description" rows="6" cols="16"></'.$ta_tag.'></td>
</tr>
<tr class="windowbg2">
<td class="smalltext" align="left"><b>Keywords:</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><input type="text" name="keywords" maxlength="100" size="15" /></td>
</tr>
<tr class="windowbg2">
<td class="smalltext" align="left"><b>' . $txt['gallery_form_uploadpic'] . '</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><input type="file" size="12" name="picture" /></td>
</tr>';
if(!empty($modSettings['gallery_commentchoice'])){
echo '
<tr class="windowbg2">
<td class="smalltext" align="left"><b>' . $txt['gallery_form_additionaloptions'] . '</b> </td>
</tr>
<tr class="windowbg2">
<td class="smalltext"><input type="checkbox" name="allowcomments" checked="checked" /><b>Allow Comments</b></td>
</tr>';
}
echo '
<tr class="windowbg2">
<td class="smalltext" width="28%" colspan="2" height="26" align="left" class="windowbg2"><input type="submit" value="Add Picture" name="submit" /></td>
</tr>
</table><br />
';
if(!allowedTo('smfgallery_autoapprove'))
echo $txt['gallery_form_notapproved'];
echo '
</form>
</div>';
Try that...My bad for not putting it up sooner...
Logged
Lum-chan
Newbie
Offline
Posts: 8
Lum-chan is cute!
Re: Quick upload to SMF gallery (TP Block)
«
Reply #8 on:
July 15, 2008, 10:01:29 am »
I use this modified code to get it in good use with TinyPortal 1.0.5 Beta1. I changed the layout a bit because I didn't like the effect of class="windowbg2", so I removed these and removed the line which says 'Quick Upload'.
This way it fits better in the Deafult Theme and variantions of it.
Code:
global $scripturl, $modSettings, $db_prefix, $txt, $context, $settings, $boarddir;
// gallery.index.php is not loaded yet, so load it here
require_once($boarddir.'/Themes/default/languages/Gallery.english.php');
// text area tag var
$ta_tag = "TEXTAREA";
//Get the category
@$cat = (int) $_REQUEST['cat'];
// display the block info
echo '
<div>
<form method="POST" enctype="multipart/form-data" name="picform" id="picform" action="' . $scripturl . '?action=gallery&sa=add2">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="129">
<tr>
<td class="smalltext">Title:<br /><input type="text" name="title" size="15" /></td>
</tr>
<tr>
<td class="smalltext">Category</td>
</tr>
<tr>
<td class="smalltext"><select name="cat">';
// get our query results to create select box
$dbresult = db_query("SELECT ID_CAT, title FROM {$db_prefix}gallery_cat ORDER BY roworder ASC", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($dbresult)){
echo '
<option value="' . $row['ID_CAT'] . '" ' . (($cat == $row['ID_CAT']) ? ' selected="selected"' : '') .'>' . $row['title'] . '</option>';
}
echo '
</select>
</td>
</tr>
<tr>
<td class="smalltext">Description: </td>
</tr>
<tr>
<td class="smalltext"><'.$ta_tag.' name="description" rows="6" cols="16"></'.$ta_tag.'></td>
</tr>
<tr>
<td class="smalltext">Keywords: </td>
</tr>
<tr>
<td class="smalltext"><input type="text" name="keywords" maxlength="100" size="15" /></td>
</tr>
<tr>
<td class="smalltext">' . $txt['gallery_form_uploadpic'] . ' </td>
</tr>
<tr>
<td class="smalltext"><input type="file" size="12" name="picture" /></td>
</tr>';
if(!empty($modSettings['gallery_commentchoice'])){
echo '
<tr>
<td class="smalltext" align="left">' . $txt['gallery_form_additionaloptions'] . ' </td>
</tr>
<tr>
<td class="smalltext"><input type="checkbox" name="allowcomments" checked="checked" />Allow Comments</td>
</tr>';
}
echo '
<tr>
<td class="smalltext" width="28%" colspan="2" height="26"><input type="submit" value="Add Picture" name="submit" /></td>
</tr>
</table>
';
if(!allowedTo('smfgallery_autoapprove'))
echo $txt['gallery_form_notapproved'];
echo '
</form>
</div>';
Example here at
at my website
I hope this small modification of your code-snipped is useful for others.
Logged
Lum-chan
Qayyom
Newbie
Offline
Posts: 7
Re: Quick upload to SMF gallery (TP Block)
«
Reply #9 on:
September 24, 2008, 04:20:05 am »
Quote from: Lum-chan on July 15, 2008, 10:01:29 am
I use this modified code to get it in good use with TinyPortal 1.0.5 Beta1. I changed the layout a bit because I didn't like the effect of class="windowbg2", so I removed these and removed the line which says 'Quick Upload'.
This way it fits better in the Deafult Theme and variantions of it.
I hope this small modification of your code-snipped is useful for others.
Dear Lum-chan,
I am using your modified codes; it is better then before and fits well in the block,
A little bit modification required from you
Please resize category drop-down menu width to get fit in the block
See image.
waiting your early and positive response
UPLOAD.gif
(6.49 KB, 202x313 - viewed 528 times.)
Logged
fotografo74
SMF Gallery Pro Customer
Jr. Member
Offline
Posts: 55
Re: Quick upload to SMF gallery (TP Block)
«
Reply #10 on:
September 24, 2008, 08:35:41 am »
Thank you JPG!
This Mod is perfect for my photography's forum ( macroforum.org )
I added align=center to <table>
request:
It's possibile add the thumbnail image in ( like Thumbnail topic mod...
http://www.smfhacks.com/index.php/topic,2238.msg10980.html#msg10980
) ?
Thanks and sorry for my english
Antonio
Logged
Ken.
Jr. Member
Offline
Posts: 74
TP Rules!
Re: Quick upload to SMF gallery (TP Block)
«
Reply #11 on:
December 02, 2008, 04:33:54 pm »
Quote from: Qayyom on September 24, 2008, 04:20:05 am
Quote from: Lum-chan on July 15, 2008, 10:01:29 am
I use this modified code to get it in good use with TinyPortal 1.0.5 Beta1. I changed the layout a bit because I didn't like the effect of class="windowbg2", so I removed these and removed the line which says 'Quick Upload'.
This way it fits better in the Deafult Theme and variantions of it.
I hope this small modification of your code-snipped is useful for others.
Dear Lum-chan,
I am using your modified codes; it is better then before and fits well in the block,
A little bit modification required from you
Please resize category drop-down menu width to get fit in the block
See image.
waiting your early and positive response
On mine I found that long album names caused the breakout on that dropdown menu.
It would be great if the code could accommodate those longer names in some way, but for now my solution was to edit the album names to make them shorter.
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
SMFHacks.com
-----------------------------
=> News
=> Site Discussion
===> Suggestions
===> Bugs
-----------------------------
SMF Gallery Pro
-----------------------------
=> Announcements
=> Presales
=> Support
===> Bugs
===> Feature Requests
-----------------------------
SMF Store
-----------------------------
=> Announcements
=> Presales
=> Support
===> Guides and Tips
===> Feature Requests
===> Bugs
-----------------------------
SMF Classifieds
-----------------------------
=> Announcements
=> Presales
=> Support
===> Bugs
===> Feature Requests
-----------------------------
Downloads System Pro
-----------------------------
=> Announcements
=> Presales
=> Support
===> Feature Requests
===> Bugs
-----------------------------
Ad Seller Pro
-----------------------------
=> Presales
=> Support
-----------------------------
Newsletter Pro
-----------------------------
=> Presales
=> Support
===> Feature Requests
-----------------------------
Social Login Pro
-----------------------------
=> Presales
-----------------------------
Badge Awards
-----------------------------
=> Presales
-----------------------------
Tweet Topics/FB Post System
-----------------------------
=> Presales
-----------------------------
SMF Gallery Lite
-----------------------------
=> SMF Gallery Lite
-----------------------------
Modifications/Themes
-----------------------------
=> General SMF Forum
=> Modifications Talk
===> Latest Mods
===> Modification Showcase
=> Theme Talk
===> Theme Showcase
===> Latest Themes
Recent
$txt['downloads_txt_day_l...
by
ApplianceJunk
[
Today
at 10:52:25 am]
Receiving eChecks?
by
ApplianceJunk
[
Today
at 10:35:29 am]
Feature Request: Ban indi...
by
ApplianceJunk
[May 24, 2012, 08:02:50 am]
Custom Fields
by
davejo
[May 24, 2012, 04:11:41 am]
Store IPN AMOUNT CHANGE
by
ApplianceJunk
[May 21, 2012, 08:54:11 am]
Transferring Db data from...
by
~ Phåråoh ~
[May 20, 2012, 11:06:52 am]
SMF vs PhpBB
by
channgam
[May 20, 2012, 05:58:11 am]
Any news?
by
SMFHacks
[May 19, 2012, 06:16:58 pm]
Social Login Pro domain c...
by
SMFHacks
[May 19, 2012, 05:42:37 pm]
licence information and q...
by
SMFHacks
[May 18, 2012, 03:08:38 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Loading...