Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Brainwrek

Pages: [1] 2
1
I've searched for this but I don't think it's been covered before...

I need to display the {image_description} and {download_button} inside my postcard_send.html template.  I've tried a few things, but I'm a PHP dummy and nothing is working.   :roll:

2
This should be easy, but I haven't found a solution yet...

How to use .htaccess to rewrite the Keywords links from this:
Code: [Select]
<a href=" http://www.site.com/photos/search.htm?search_keywords=dogs_cats">DOGS & CATS</a>
To this:
Code: [Select]
<a href=" http://www.site.com/photos/keywords/dogs_cats">DOGS & CATS</a>
I would love to have this!!!

3
Correction.  I didn't place the code high enough in the page.  Fixed that, and it seems to be working great now.  Thank you!

4
Mods & Plugins (Requests & Discussions) / Re: Export Emails to csv
« on: August 24, 2006, 07:34:37 AM »
Ok...

With valuable help from TheOracle (thank you!), this is working very well for extracting the emails from ecards.  Here's the code I'm using:
Code: [Select]
<?php // PLUGIN_TITLE: Ecard Emails

$nozip 1;
define('IN_CP'1);
define('ROOT_PATH'"./../../");
define('ROOT_PATH_ADMIN'"./../");
require(
ROOT_PATH_ADMIN.'admin_global.php');

show_admin_header();

$anzahl 0

$sql "SELECT postcard_recipient_email, postcard_sender_email
FROM "
.POSTCARDS_TABLE."";

$result $site_db->query($sql);
$anz $site_db->get_numrows($result); 

if (
$anz) {

$fp = @fopen('addresses/emails.csv''w+'); 

while (
$sql_array $site_db->fetch_array($resultMYSQL_NUM)) { 
$text implode("," $sql_array) . ","
$list str_replace("," "\n" $text);
@
fwrite ($fp$list); 
###### End of while statement.

@fclose($fp); 

echo 
"<a href=\"".$site_sess->url(ROOT_PATH_ADMIN."plugins/addresses/emails.csv")."\">Download</a>";

###### End of if statement.

show_admin_footer();
?>

5
Mods & Plugins (Requests & Discussions) / Re: Export Emails to csv
« on: August 23, 2006, 11:14:31 PM »
This looks OUTSTANDING!

I would like to modify it to retrieve all sender & recipient email addresses from the ecards.  I tried the following code, but it crashes out.

Code: [Select]
<?php // PLUGIN_TITLE: Ecard Emails

$nozip 1;
define('IN_CP'1);
define('ROOT_PATH'"./../../");
define('ROOT_PATH_ADMIN'"./../");
require(
ROOT_PATH_ADMIN.'admin_global.php');

show_admin_header();

$anzahl 0

$sql "SELECT ".get_user_table_field("""postcard_recipient_email"). get_user_table_field(", ""postcard_sender_email")."
FROM "
.POSTCARDS_TABLE."";
//WHERE user_allowemails = '1'"; 

$result $site_db->query($sql);
$anz $site_db->get_numrows($result); 

if (
$anz) {

$fp = @fopen('all-ecard-addresses/list.csv''w+'); 

while (
$sql_array $site_db->fetch_array($resultMYSQL_NUM)) { 
$text implode(' ; '$sql_array) . " ; \n"
@
fwrite ($fp$text); 
###### End of while statement.

@fclose($fp); 

echo 
"<a href=\"".$site_sess->url(ROOT_PATH_ADMIN."plugins/all-ecard-addresses/list.csv")."\">".$lang['download']."</a>";

###### End of if statement.

show_admin_footer();
?>

The error for the above code is:
Quote
DB Error: Bad SQL Query: SELECT FROM 4postcards
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM 4postcards' at line 2

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/stick/public_html/ecards/includes/db_mysql.php on line 116

Still investigating, but would appreciate any help you could provide.  Thanks!!!

Special thanks to TheOracle!

6
Mods & Plugins (Releases & Support) / Re: [Mod] Toplist altered
« on: August 23, 2006, 11:05:59 PM »
Ahum... any ideas on my previous post?  This is really strange.

7
Mods & Plugins (Requests & Discussions) / Re: Export Emails to csv
« on: August 23, 2006, 11:02:11 PM »
This looks OUTSTANDING!

I would like to modify it to retrieve all sender & recipient email addresses from the ecards.  I tried the following code, but it crashes out.

Code: [Select]
<?php // PLUGIN_TITLE: Ecard Emails

$nozip 1;
define('IN_CP'1);
define('ROOT_PATH'"./../../");
define('ROOT_PATH_ADMIN'"./../");
require(
ROOT_PATH_ADMIN.'admin_global.php');

show_admin_header();

$anzahl 0

$sql "SELECT ".get_user_table_field("""postcard_recipient_email"). get_user_table_field(", ""postcard_sender_email")."
FROM "
.POSTCARDS_TABLE."";
//WHERE user_allowemails = '1'"; 

$result $site_db->query($sql);
$anz $site_db->get_numrows($result); 

if (
$anz) {

$fp = @fopen('all-ecard-addresses/list.csv''w+'); 

while (
$sql_array $site_db->fetch_array($resultMYSQL_NUM)) { 
$text implode(' ; '$sql_array) . " ; \n"
@
fwrite ($fp$text); 
###### End of while statement.

@fclose($fp); 

echo 
"<a href=\"".$site_sess->url(ROOT_PATH_ADMIN."plugins/all-ecard-addresses/list.csv")."\">".$lang['download']."</a>";

###### End of if statement.

show_admin_footer();
?>

The error for the above code is:
Quote
DB Error: Bad SQL Query: SELECT FROM 4users
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM 4users' at line 2

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/stick/public_html/ecards/includes/db_mysql.php on line 116

Still investigating, but would appreciate any help you could provide.  Thanks!!!

Special thanks to TheOracle!

8
Hmmm. interesting thought!  I've been using it right before the Clickstream code.

Ooops.  I tried it, but now the main image just comes up as 404 image missing.  I will keep investigating.  Any ideas?

BTW... thanks MUCHO for your help so far!!!!!!   :D

9
Thank you, but this is not what I'm talking about.

I want a 4x5 table of random thumbnails... just like the Random Pictures MOD you created here:
http://www.4homepages.de/forum/index.php?topic=4259.msg17513#msg17513

But as I stated in that thread over a month ago, that MOD will NOT work properly on the details or postcards pages.  How can I make it work *without* also randomizing the main {image} image?

Thank you!

10
I'm successfully using the Random Images MOD on my index page, but I also need random images displayed on the details page and postcard pages.  How can I do this?  I'm using 1.7.2.

11
Chit Chat / Re: V@no or Jan... Calling you guys out!
« on: August 22, 2006, 10:40:54 PM »
only installing existing mods or a completely new customisation like this http://sevenload.de/home ?
Ok, I re-read your post and I think I understand what you're saying now.  I am using existing mods, but with several hacks to them, so that they will function better than before.  It's the HACKS to the MODS that I need assistence with.

12
Chit Chat / Re: V@no or Jan... Calling you guys out!
« on: August 22, 2006, 10:35:44 PM »
That's a great link.  Love that site.  Wow.  But I don't understand what you are saying.

I have a highly customized site too, and I am willing to pay $$$ for some expert help with it.

13
Chit Chat / V@no or Jan... Calling you guys out!
« on: August 22, 2006, 03:36:03 AM »
 :D  I have a project that I've been working on for a while, and it involves lots of 4images mods.  Everything has been going fine, and I love 4images.  But I'm now against a deadline and need help to get some loose ends tied up.  I want to hire a 4images expert to help me work out some of my finishing touches/requirements. 

Please PM me or let me know how to reach you if you're open/willing to do some custom (paid) work for me.  I can pay you however you want... credit card, PayPal, whatever.

Thanks!!!!

14
Mods & Plugins (Releases & Support) / Re: [Mod] Toplist altered
« on: August 21, 2006, 08:52:54 AM »
Hello.  I have followed this tutorial very carefully (several times), and I am having a troubling problem with it.

Thumbs are only being shown on the ODD numbers (#1, #3, #5, #7, #9).  The even numbered thumbs are not being displayed.  In fact, the even numbered template variables (example: {image_rating_thumb_2}) are not being parsed at all.  So I end up with a page that looks like this:

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #1 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_2}

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #3 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_4}

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #5 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_6}

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #7 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_8}

|----------------------|
|----------------------|
|----------------------|
|-----THUMB #9 ----|
|----------------------|
|----------------------|
|----------------------|

{image_rating_thumb_10}


Here is a sample of the code I am using:

Code: [Select]
// Rating
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name, i.image_thumb_file".get_user_table_field(", u.", "user_name")."
        FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id
        $cat_match_sql
        ORDER BY i.image_rating DESC, i.image_name ASC
        LIMIT 10";
$result = $site_db->query($sql);
$top_list = array();
$i = 1;
while ($row = $site_db->fetch_array($result)) {
  $top_list[$i] = $row;
  $i++;
}
$site_db->free_result();

for ($i = 1; $i <= 10; $i++) {
  if (isset($top_list[$i])) {
    $register_array['image_rating_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($top_list[$i]['image_name']);
    $register_array['image_rating_openwindow_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($top_list[$i]['image_name']);
    if (isset($top_list[$i][$user_table_fields['user_name']]) && $top_list[$i]['user_id'] != GUEST) {
      $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $top_list[$i]['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'];
      $register_array['image_rating_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".format_text($top_list[$i][$user_table_fields['user_name']])."</a>";
    }
    else {
      $register_array['image_rating_user_'.$i] = $lang['userlevel_guest'];
    }
    $register_array['image_rating_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".format_text($top_list[$i]['cat_name'])."</a>";
    $register_array['image_rating_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
$register_array['image_rating_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";
  }
  else {
    $register_array['image_rating_'.$i] = "--";
    $register_array['image_rating_user_'.$i] = "--";
    $register_array['image_rating_cat_'.$i] = "--";
    $register_array['image_rating_number_'.$i] = "--";
$register_array['image_rating_thumb_'.$i] = "--";
  }
}


BTW... I'm running v1.7.2
Anyone have a clue what's going on here?

Thanks!

15
LeeWicked... Glad that helped.   :D

V@no... PM me.  I have some paid work for you if you're interested.  Against a deadline and I need your expertise.

Pages: [1] 2