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 - Fugaziman

Pages: [1] 2 3 4
1
In the php files you could just comment out the bits of code you don't want to use.
eg. add "//" to the begining of each line.

Be careful to test though as it's not as easy as it may seem.
By doing this you don't have to remove the "{}"'s either as they will be ignored.

BACKUP FILES FIRST  :!:  :!:  :!:
That's my 2 cents/pennies/francs/etc. worth  :D

2
Quote from: lutz
hi,
i see, the link is down, or rather redirected to the main page... :cry:
any reasons for that?


Not sure what you mean  :?:
Fugaziman  :oops:

3
Mods & Plugins (Requests & Discussions) / ???
« on: June 11, 2003, 10:41:55 PM »
I just noticed this post and couldn't help noticing it's very similar to a Mod post I made a little while ago.  :?:

http://www.4homepages.de/forum/viewtopic.php?t=5654

My mode does not do any extra Database Calls (slowing your page load time)

You can see it in action on my web page - Left side.
Just thought it may help.
I'll go now  :D

4
Mods & Plugins (Releases & Support) / [Mod] Latest News and Archive
« on: June 07, 2003, 08:31:35 PM »
Quote from: aymanati
this was in line 243:

     "row_bg_number" => $row_bg_number));


Oops ! Just noticed I missed a comma (,) at the end of this line

Code: [Select]
"news_comment_name" => $news_comment_row[$i]['user_name'],

See if that helps
Sorry but I still haven't had time to test this.
Fugaziman

5
Mods & Plugins (Releases & Support) / [Mod] Latest News and Archive
« on: June 06, 2003, 04:19:43 PM »
Quote from: aymanati
I think this is very stupid, but how could I know the image id ?  :oops:
quote]

IOf you mean the image_id of the Latest_News image you created in step1 then the easiest way is to...
log into your site as the administrator.
Find your Latest News image
Click on it to bring up the Details page
Look at the URL/Address line in the browser and you should see something like image_id=****

That's your Lates News image ID.

Hope that Helps
Fugaziman  8)

6
Mods & Plugins (Releases & Support) / [Mod] Latest News and Archive
« on: May 31, 2003, 04:32:28 PM »
Quote from: tmacisnbr1
Is there a way to make it so that it shows the name of the user that posted the comment in the news header?


I haven't tested this but it should work.....

Replace Step7 with this code
Code: [Select]
//--------------------------------------------------------
// Latest and Archive News Mod            --
//                     --
// User configurable variables            --
// You must change the first 4 variables to meet   --
// your requirements:     (see notes below)      --
//     $display_by_count            --
//     $latest_news_day               --
//     $show_news_articles            --
//     $news_image               --
//--------------------------------------------------------
  $display_by_count = "0";      // values 0 or 1 ....
                                // .... change this to 0 if display by days posted
                                // .... or 1 to display fixed number of news articles as Latest
                               
  $latest_news_days = "31";     // Number of days news displays at Latest ....
                                // .... change This to the number of days news shows as Latest
                               
  $show_news_articles = "5";    // Number of news articles to show ....
                                // .... change This to fixed number of articles to display for latest news
                               
  $news_image = "*****";          // Change This to your Latest news image id
//----------------------------------------------------

$new_news = (time() - 60 * 60 * 24 * $latest_news_days);

if ($newstype == "latestnewsall"){
    $news_type = "latestnewsall";
    }
else {
    $news_type = "latestnews";
    }

  $additional_sql = "";

  if ($news_type == "latestnews") {

    if ($display_by_count) {
        $additional_sql .= "  c.image_id = '".$news_image."'";
        $additional_sql_2 .= " LIMIT ".$show_news_articles;
    }
    else {
        $additional_sql .= " c.comment_date > '".$new_news."' AND c.image_id = '".$news_image."'";
        $additional_sql_2 .= "";
    }
  }

  else {
    $additional_sql .= " c.image_id = '".$news_image."'";
    $clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>&nbsp;/&nbsp;Archived News";
  }

  $sql = "SELECT c.comment_headline, c.comment_text, c.comment_date, c.image_id, c.user_name
            FROM ".COMMENTS_TABLE." c
            WHERE ".$additional_sql."
            ORDER BY c.comment_date DESC" .$additional_sql_2 ;

  $result = $site_db->query($sql);
  $num_rows = $site_db->get_numrows($result);
  $news_comment_row = array();

  while ($row = $site_db->fetch_array($result)) {
    $news_comment_row[] = $row;
  }

  $site_db->free_result($result);
   
// This is the Paging stuff
  if ($newstype == "latestnewsall") {
       
    include(ROOT_PATH.'includes/paging.php');
    $perpage = $show_news_articles;
    $link_arg = $site_sess->url(ROOT_PATH."index.php?newstype=latestnewsall");
    $getpaging = new Paging($page, $perpage, $num_rows, $link_arg);
    $offset = $getpaging->get_offset();

    $site_template->register_vars(array(
      "paging" => $getpaging->get_paging(),
      "paging_stats" => $getpaging->get_paging_stats()
    ));
     
    $sql = "SELECT c.comment_headline, c.comment_text, c.comment_date, c.image_id, c.user_name
            FROM ".COMMENTS_TABLE." c
            WHERE ".$additional_sql."
            ORDER BY c.comment_date DESC" .$additional_sql_2."  
            LIMIT $offset, $perpage";

          $result = $site_db->query($sql);
          $num_rows = $site_db->get_numrows($result);
          $news_comment_row = array();
           
      while ($row = $site_db->fetch_array($result)) {
            $news_comment_row[] = $row;
          }
  }

  if (!$num_rows) {
      $news_comments = "&nbsp;&nbsp;&nbsp;<b>No New News to report within the last ".$latest_news_days." days.</b>";
  }
  else {
      $news_comments = "";
      $bgcounter = 0;

    for ($i = 0; $i < $num_rows; $i++) {
        $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

        $site_template->register_vars(array(
            "news_comment_headline" => format_text($news_comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
            "news_comment_text" => format_text($news_comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
            "news_comment_date" => format_date($config['date_format']." ".$config['time_format'], $news_comment_row[$i]['comment_date']),
            "news_comment_name" => $news_comment_row[$i]['user_name'],
            "row_bg_number" => $row_bg_number));

        $news_comments .= $site_template->parse_template("news_comment_bit");
    }

  }
  $site_template->register_vars("news_comments", $news_comments);
  unset($news_comments);

//-----------------------------------------------------
//---End of Show Latest News   -------------------------------
//-----------------------------------------------------



Then in the news_comment_bit.html you created add
Code: [Select]
{news_comment_name} Where you want the username to appear.

Good luck
Fugaziman

7
You need to make sure you correctly edited the Search.php

I had this problem myself when creating this mod so I know that this is were your problem is.

Hope that helps
Fugaziman

8
Chit Chat / Hosting
« on: May 28, 2003, 09:17:54 PM »
Hello all,

I know that from time to time people have asked about hosting companies and recommending good ones. Well over the past 2 weeks I've gone through a nightmare of 2 different hosting companies only to find out they could not deliver what they promised once I uploaded my site (probably why I've been quite in this forum  :D   ).

All I wanted was...
Support for MySql
Support for PHP
Support for GD 2.0
1Gig Space
a good amount of bandwidth
and A GOOD PRICE (VERY IMPORTANT)

Well I'm glad to say I've finally found one and their support rocks.
Usually within 1 hour of me sending them an Email (any time of day) I would get a reply either solving my problem or telling me what they were going to do to help.

They have an online support app (I didn't use that though).

They even installed GD 2.0 for me so that I could use the Annotation mod.

I'm not going to advertise them here mainly because I don't agree with it on forums but if you what to know more just send me a PM or Email.

Oh and by the way I don't get paid commision or any rewards for recommending them  :D

Just thought I'd let you know.
Hope you don't mind
Fugaziman

9
Mods & Plugins (Releases & Support) / [Mod] Latest News and Archive
« on: May 23, 2003, 05:00:20 PM »
Looks like a problem with your home.html file.
perhaps a missing <tr> or <td>

Fugaziman

10
Mods & Plugins (Releases & Support) / [Mod] Latest News and Archive
« on: May 22, 2003, 04:18:32 PM »
Quote
How do i get the image_id?


Just log in to your site with your admin account
find your latest News image
click on it's thumbnail to get the details page
in the URL you should see something like image_id = XXXX

That's your image id.
Good luck
Fugaziman

11
Mods & Plugins (Releases & Support) / Thanks
« on: May 17, 2003, 10:04:28 PM »
Thanks Chris

have amended post
Fugaziman

12
Mods & Plugins (Releases & Support) / Here's the answer
« on: May 17, 2003, 06:23:38 PM »
I think this will do it...

Make a backup copy of  ./templates/your_templates/slideshow.html
Edit your ./templates/your_templates/slideshow.html

You want to remove several items...
{random_cat_image} - This bit show your random Image
{user_box} - shows the login box
{category_dropdown_form} - show the drop down list box
{setperpage_dropdown_form} - shows images per page drop down list box

If you remove these it should clean up your page as requested.
Just be careful when removing these that the format of your page doesn't change to much. Do one thing at a time and check. You may need to play with your html to get it set out as you want it.

Hope that helps
Fugaziman

13
Mods & Plugins (Releases & Support) / [Mod] Latest News and Archive
« on: May 17, 2003, 03:44:25 AM »
Quote from: tmacisnbr1


If you have a little spare time and would be willing to help me out a little, please email .

Thanks!
Alex


Have sent you an email. Will help if I can.
Might I suggest next time sending me a PM from the forum. :wink:

14
Quote from: Maweryk
Great idea, but if I open index.php, {new_image_cats} is there instead of the new image cats.
Any idea?

Thanks and cheers,
Markus


Not quite sure what you mean  :roll:
The {new_image_cats}  should be added to your template files where you want it to display.

Can you give me a little more info  :?:
Fugaziman

15
V.2. Thanks to V@no (were have I heard that before   :?:   :lol: ) and his performance tuning and 4images knowledge I have updated the part of this mod that changes the page_header.php file.

If you have already installed this mod don't worry just change the bit you added in the page_header.php file with the new code.

I'm afraid I can take no credit of this re-write at all. All must go to V@no.
I think for now on we should all come up with the ideas and V@no writes them up for us  :lol:  


This Mod creates a table that displays the number of new images in each category (that has new images)
and provides links to the search page that will only display new images for that specific category.
It will only show categories that the user has access to.

To see this in action just look at the left side column of my site under the Random Image
http://www.newman.d2g.com/

Time to add Mod:
15-20 minutes

Files Changed
- includes/page_header.php
- Search.php
- templates/your_template/home.html

Note: As usual - BACKUP all of these files before changing them.


 :arrow: Edit includes/page_header.php

At the end of the page before:
Code: [Select]
?>
Add:

Code: [Select]
//-----------------------------------------------------
//---Show New Image count in category------------------
//-----------------------------------------------------

$new_image_category = "<table border=1 cellpadding=3 cellspacing=1 width=\"100%\">";

foreach ($new_image_cache as $key => $val) {
     if ($val && check_permission("auth_viewcat", $key)) {
     $category_link = "<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_new_images=1&cat_id=".$key."&sub_cat=no")."\">".$val."</a>";
     $new_image_category .= "<tr><td><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$cat_cache[$key]['cat_id'])."\">".$cat_cache[$key]['cat_name']."</a></td><td><b>".$category_link."</b></td></tr>";
   }
}
  
  $new_image_category .= "</table>";
  $site_template->register_vars("new_image_cats", $new_image_category);
  unset($new_image_category);


 :arrow: Edit Search.php

Find:
Code: [Select]
if (isset($HTTP_POST_VARS['search_fields'])) {
  $search_fields = trim($HTTP_POST_VARS['search_fields']);
}
else {
  $search_fields = "all";
}

Add After:

Code: [Select]
//-----------------------------------------------------
//---Show New Image count in category Mod -------------
//-----------------------------------------------------

if (isset($HTTP_GET_VARS['sub_cat'])) {
  $sub_cat = trim($HTTP_GET_VARS['sub_cat']);
}
else
{
  $sub_cat = isset($HTTP_POST_VARS['sub_cat']) ? trim($HTTP_POST_VARS['sub_cat']) : 1;
}

if (isset($HTTP_GET_VARS['cat_id'])) {
  $search_cat = intval($HTTP_GET_VARS['cat_id']);
}
else {
$search_cat = (isset($HTTP_POST_VARS['cat_id']) ) ? intval($HTTP_POST_VARS['cat_id']) : 0;
}
//-----------------------------------------------------
//---End of Show New Image count in category Mod ------
//-----------------------------------------------------

Be careful with this bit, make shure you have all the }'s in place
Find:

Code: [Select]
if (check_permission("auth_viewcat", $search_id['search_cat'])) {
      $cat_id_sql .= ", ".$search_id['search_cat'];
      if (!empty($sub_cat_ids[$search_id['search_cat']])) {
        foreach ($sub_cat_ids[$search_id['search_cat']] as $val) {
          if (check_permission("auth_viewcat", $val)) {
            $cat_id_sql .= ", ".$val;
          }
        }
      }
    }


Replace with:

Code: [Select]
if (check_permission("auth_viewcat", $search_id['search_cat'])) {
      $cat_id_sql .= ", ".$search_id['search_cat'];
      if ($sub_cat != "no") { // Show New Image count in category Mod
       if (!empty($sub_cat_ids[$search_id['search_cat']])) {
         foreach ($sub_cat_ids[$search_id['search_cat']] as $val) {
           if (check_permission("auth_viewcat", $val)) {
             $cat_id_sql .= ", ".$val;
           }
         }
       }
     }   // Show New Image count in category Mod
}

 


 :arrow: In your home.html file

Add:
Code: [Select]
{new_image_cats}
where you want the "New images in Category" to appear.

That's all there is to it.
Have fun
Fugaziman 8)

Pages: [1] 2 3 4