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

Pages: 1 2 3 4 [5] 6 7
61
Mods & Plugins (Releases & Support) / Re: [Mod] Mini-Top
« on: June 28, 2007, 04:27:55 PM »
an awesome MOD. Now, how could i show the mini-top mod on an external page outside of 4images directory?

62
Hi,

i want to show the top rated pictures of 4images on an external page (in my blog) outside of the 4images directory.

4images path: www.homepage.de/photos/
blog path: www.homepage.de/blog/

I used the code of the MINI-TOP MOD, but get several errors:
            
Code: [Select]
<?php

define
('GET_CACHES'1);
define('ROOT_PATH''./photos/');
$user_access get_permission();

$imgtable_width ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((
substr($config['image_table_width'], -1)) == "%") {
  
$imgtable_width .= "%";
}

 
$mini_top_images "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
 
$mini_top_images .= "<tr class=\"imagerow1\">\n";

 
$selection = array('rating''votes''hits''comments''downloads');
 
$selection_alt = array('votes DESC''rating DESC''name ASC''name ASC''name ASC');
# $selection_cutoff = array(' AND i.image_votes > 10', '', '', '', '');

 
$num_of_cells $config['image_cells'];
 
$num_of_cells $num_of_cells count($selection) ? count($selection) : $num_of_cells;

 for (
$cnt 0$cnt $num_of_cells$cnt++) {

 
$mini_top_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".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 c.cat_id = i.cat_id AND i.cat_id IN ("
.get_auth_cat_sql("auth_viewcat").")".$selection_cutoff[$cnt]."
        ORDER BY i.image_"
.$selection[$cnt]." DESC, i.image_".$selection_alt[$cnt];

 
$result $site_db->query_firstrow($sql);
 
show_image($result);
 
$site_template->register_vars("lang_mini_top_mode"$lang['mini_top_'.$selection[$cnt]]);
 
$mini_top_images .= $site_template->parse_template("mini_top_bit");
 
$mini_top_images .= "\n</td>\n";
}

 
$mini_top_images .= "</tr>\n";
 
$mini_top_images .= "</table>\n";

 
$site_template->register_vars(array(
  
"mini_top_images" => $mini_top_images,
  
"lang_hits" => $lang['hits'],
  
"lang_downloads" => $lang['downloads'],
  
"lang_mini_top_title" => $lang['mini_top_title']
 ));
unset(
$mini_top_images);

?>

error:

Fatal error: Call to undefined function: get_permission() in /htdocs/blog/wp-content/themes/pilotenbilder_2007/uebersicht.php on line 110

in line 110 is the following code:

$user_access = get_permission();

63
Warum darf man eigentlich seine MODS nicht im Releases Forum posten?


Integration von Wordpress 2.2, PHPBB 2.0.22 und 4Images 1.74


SCHRITT 1 - Installation PHPBB
Installiere als erstes PHPBB (Version 2.0.xx). Die Datenbank von PHPBB wird als Grundlage für alle 3 Komponenten dienen.

SCHRITT 2 - Installation 4Images
Installiere 4Images. Die Datenbank muss die selbe sein wie der von der PHPBB-Installation.

SCHRITT 3 - Integration PHPBB und 4Images
Gehe zu dieser Post im 4Images Forum (http://wordpress.org/support/topic/80535) und lade die integration_phpbb.zip herunter und folgt der Installationsanleitung. Es ist ein sehr langer Post. Ihr benötigt aber wahrscheinlich keine weitere Recherche. Jedoch wird ein Fehler auftreten. Durch einige Updates mit den Sessions wird die Fehldermeldung “Invalid Session” früher oder später auftauchen. Ihr löst das Problem mit folgendem Post: http://www.4homepages.de/forum/index.php?topic=4315.0

SCHRITT 4 - Installation Wordpress
Installiere nun Wordpress. Denk daran, dieselbe Datenbank wieder zu nutzen.

SCHRITT 5 - Integration von Wordpress und PHPBB
Da wir die Datenbanktabellen von PHPBB nutzen, installieren wir nun die Schnittstelle zu Wordpress. Dafür gibt es ein atemberaubendes PLUGIN bzw . einen MOD (siehe: http://www.wp-united.com, http://www.phpbb.com/community/viewtopic.php?f=16&t=475642&st=0&sk=t&sd=a)
Folgt den dortigen Anweisungen! Dort gibt es auch Referenzseiten, die es bereits geschafft haben!
(Es kann sein, dass man sich noch Easymod für PHPBB herunterladen muss. Das Skript vereinfacht die Installation von MOD’s extrem! Ich habe die beta Version 0.3.0 getestet und sie funktionierte tadellos!)

VOILÀ!!!


Da ich leider nicht jeden Tag im Forum bin und aber diese Anleitung stetig weiterentwickeln und aktuell halten möchte, poste ich nur die Basics. Bitte lest die komplette Anleitung und sonstige Hinweise auf http://www.sebastianscheuer.de/aktuell/integration-von-wordpress-blog-phpbb-forum-und-4images-bildergallerie/



/************************************************************************************************************************************\

ENGLISH TRANSLATION
2007, Integration of Wordpress 2.2, PHPBB 2.0.22 and 4Images 1.74

Every webworker who needs powerful (open-source) software components like a forum, a blog, or a photo-gallery knows, that there arent not so much solutions, which work without multiple registrations of the user. This sucks!

I have taken some weeks research on the web and got lucky to find everywhere some hints, but most of them where too complicated or too old.

Ok, lets do it! You need:

BLOG - Wordpress - http://www.wordpress.org
FORUM - phpBB - http://www.phpbb.com
GALLERIE - 4images - http://www.4homepages.de/

Aprox. time: about 2 - 4 hours
Knowledge: Beginner and Professionells
(Everyone can do it, if he is willing to read everything twice!! Its just a matter of time ;)

STEP 1 - Install PHPBB

At the very first, install PHPBB (version 2.0.xx). The same database of phpbb must be used for Wordpress and 4images, since we wiill use the user tables of phpbb for all components.

STEP 2 - Install 4Images
Install 4Images. Use as mentioned before the same database as for phpbb!

STEP 3 - Integration of PHPBB and 4Images

Now, it is getting tricky! Go to the following thread in the 4Images Forum (http://wordpress.org/support/topic/80535) and download integration_phpbb.zip. Follow the installation guide!. It is a very long thread, but you will probably not read the whole one. BUT: Sooner or later you will get one error message “Invalid Session”! Go to the following post to solve it: http://www.4homepages.de/forum/index.php?topic=4315.0

STEP 4 - Install Wordpress
Install Wordpress. Dont forget, to use the same database!!

STEP 5 - Integration of Wordpress and PHPBB

Because of using the user-database tables of PHPBB, we must now install the connection to Wordpress. There is an amazing PLUGIN/MOD for that (Links: http://www.wp-united.com, http://www.phpbb.com/community/viewtopic.php?f=16&t=475642&st=0&sk=t&sd=a)
I am sure the developer would be lucky to gain some donations for his work!
There are also websits who have already done it.
If you are new to PHPBB, it is the best to install an modification for PHPBB. It is called Easymod (Installation(german), Download: Download)! It makes it easy to modificate the code! I have testet the beta version 0.3.0 and it worked without any problems!

VOILÀ!!!


Please visit http://www.sebastianscheuer.de/aktuell/integration-von-wordpress-blog-phpbb-forum-und-4images-bildergallerie/
 for further details!

64
Ich habe eine aktualisierte Anleitung geschrieben mittels der man PHPBB, 4Images und Wordpress integrieren kann!

http://www.sebastianscheuer.de/aktuell/integration-von-wordpress-blog-phpbb-forum-und-4images-bildergallerie/

Weil es nicht hier hin gehört, werde ich einen neuen Thread damit eröffnen.


Use the link to integrate 4images with phpbb and wordpress. There is an english translation of the tutorial!

65
Mods & Plugins (Requests & Discussions) / Re: STAR RATING RELOADED
« on: June 18, 2007, 10:36:00 PM »
zeigen zeigen zeigen..... wow...ich kanns kaum erwarten!!  :roll:

66
Mods & Plugins (Requests & Discussions) / Re: STAR RATING RELOADED
« on: June 18, 2007, 04:59:24 PM »
 :P

dann sollten wirklich alle STAR RATING Versionen bei 4images möglich sein

67
Mods & Plugins (Requests & Discussions) / STAR RATING RELOADED
« on: June 18, 2007, 01:59:57 PM »
Hi,

ich habe mir viele der hier vorgestellten star rating MODs angeguckt und trotzdem suche ich eine Mischung aus mehren.

Ich versuche gerade das so hinzubekommen wie auf http://www.cssremix.com/.

Also:
1. Man sieht anhand der Sterne die aktuelle Bewertung => Nicky hat sowas geschrieben
2. Wenn man darübergeht, kann man neu bewerten => von KurtW
3. Und mittels Ajax brauch sich keine neue Seite laden

aber soweit ich das überblicke gibt es noch keine Mischung aus dem ganzen.

@KURT: Du hast doch schon sowas ähnliches gemacht. Wäre es schwer diese Funktionen hinzuzufügen?

68
yes i have :(
i added   {rating_url} the the path seeme to be registered correctly
also when i`ve already voted i get the corresponding message
so i think it has something to do with rating .php (??)


somene posted this link http://komodomedia.com/blog/index.php/2005/08/24/creating-a-star-rater-using-css/
i`ve tried it and works

in rate_form.html
inside the span tags replace the code with this
<ul class='star-rating'>
  <li><a href="javascript:rate('1');" title='Rate this 1 star out of 5' class='one-star'>1</a></li>
  <li><a href='"javascript:rate('2');" title='Rate this 2 stars out of 5' class='two-stars'>2</a></li>
  <li><a href="javascript:rate('3');" title='Rate this 3 stars out of 5' class='three-stars'>3</a></li>
  <li><a href="javascript:rate('4');" title='Rate this 4 stars out of 5' class='four-stars'>4</a></li>
  <li><a href="javascript:rate('5');" title='Rate this 5 stars out of 5' class='five-stars'>5</a></li>
</ul>
      

and add in style.css

/*             styles for the star rater                */
.star-rating{
   list-style:none;
   margin: 0px;
   padding:0px;
   width: 100px;
   height: 20px;
   position: relative;
   background: url(star_rating.gif) top left repeat-x;      
}
.star-rating li{
   padding:0px;
   margin:0px;
   /*\*/
   float: left;
   /* */
}
.star-rating li a{
   display:block;
   width:20px;
   height: 20px;
   text-decoration: none;
   text-indent: -9000px;
   z-index: 20;
   position: absolute;
   padding: 0px;
}
.star-rating li a:hover{
   background: url(star_rating.gif) left bottom;
   z-index: 1;
   left: 0px;
}
.star-rating a.one-star{
   left: 0px;
}
.star-rating a.one-star:hover{
   width:20px;
}
.star-rating a.two-stars{
   left:20px;
}
.star-rating a.two-stars:hover{
   width: 40px;
}
.star-rating a.three-stars:hover{
   width: 60px;
}
.star-rating a.three-stars{
   left: 40px;
}
.star-rating a.four-stars{
   left: 60px;
}   
.star-rating a.four-stars:hover{
   width: 80px;
}
.star-rating a.five-stars{
   left: 80px;
}
.star-rating a.five-stars:hover{
   width: 100px;
}
   
don`t foregt to change the paths of the images    
ps it`s for a 20X20p star image

there is still one mistake in the code in rate_form.html:

<span id="kbrating">
<ul class='star-rating'>
  <li><a href="javascript:rate('1');" title='Rate this 1 star out of 5' class='one-star'>1</a></li>
  <li><a href='"javascript:rate('2');" title='Rate this 2 stars out of 5' class='two-stars'>2</a></li>
  <li><a href="javascript:rate('3');" title='Rate this 3 stars out of 5' class='three-stars'>3</a></li>
  <li><a href="javascript:rate('4');" title='Rate this 4 stars out of 5' class='four-stars'>4</a></li>
  <li><a href="javascript:rate('5');" title='Rate this 5 stars out of 5' class='five-stars'>5</a></li>
</ul>
</span>

correct code:

<span id="kbrating">
<ul class='star-rating'>
  <li><a href="javascript:rate('1');" title='Rate this 1 star out of 5' class='one-star'>1</a></li>
  <li><a href="javascript:rate('2');" title='Rate this 2 stars out of 5' class='two-stars'>2</a></li>
  <li><a href="javascript:rate('3');" title='Rate this 3 stars out of 5' class='three-stars'>3</a></li>
  <li><a href="javascript:rate('4');" title='Rate this 4 stars out of 5' class='four-stars'>4</a></li>
  <li><a href="javascript:rate('5');" title='Rate this 5 stars out of 5' class='five-stars'>5</a></li>
</ul>
</span>

69
well, the idea behind that, is that all components use ONE database. in this type of integration wordpress and 4images use the databasetables of phpbb. to use 4images and wordpress together, there is right now no other solutions, i believe. however, u can try to integrate them and tell us how you did it  :lol:

an workaround could be to do the integration like I described it and to hide phpbb. in wordpress there are some other forum plugins u could use, but I think this post doesnt belong here.

70
hab ich schon gemacht. da sind aber so viele unbekannte variablen die zu 4images gehören. aus wordpress heraus müsste ich die 4images variablen ersetzen, aber ich weiß nicht mit was. z.B.

// Rating
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".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";



Images_Table und categories_table weiß ich. bei get_user_table_field scheitere ich dann schon.

Ergebnis:

// Rating
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ("4images_images" i, "4images_categories" 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";



gibt es irgendwo eine datei wo die ganzen sachen definiert sind?

ab zeile 75 in der top.php blicke ich dann gar nicht mehr durch. ufff  8O




71
Hallo,

im Bezug auf meinen vorherigen MOD (http://www.4homepages.de/forum/index.php?topic=17796.msg94823#msg94823), welcher sich um die Anzeige der neuesten Bilder in Wordpress handelte, möchte ich nun die best bewertesten Bilder in Wordpress anzeigen. Ich weiss aber nicht ganz genau wie ich das machen soll, kann mir da jemand aushelfen?


==============0

Hi,

corressponding to my other MOD (http://www.4homepages.de/forum/index.php?topic=17796.msg94823#msg94823), which shows the newest pictures in Wordpress, I would like to show the best rated pictures, now. But I dont know how to do that. Any idea?

72
Hi,

ich habe die Integration von 4Images, PHPBB und Wordpress tatsächlich hinbekommen (How-To at: http://www.sebastianscheuer.de/aktuell/integration-von-wordpress-blog-phpbb-forum-und-4images-bildergallerie/)

Nun möchte ich natürlich Bilder auch in Wordpress anzeigen lassen.


[MOD] Neueste Bilder in WORDPRESS / Newest pics in WORDPRESS:


Vorrausetzung: 4Images und Wordpress sind in der selben Datenbank! / 4Images und Wordpress must be using the same database!!

Fügt in euren Wordpress-Theme Dateien folgenden Code hinein (abgewandelt von Nicky) / Put this code into your Wordpress-Theme, whereever u want:



 // BEGIN letzte Bilder anzeigen

// Set here the URL to your 4images Gallery. WITH trailing slash!
define('SCRIPT_URL', 'http://www.domain.de/4images/');


// Set here your THUMBNAIL directory. Normally no need to change. WITHOUT trailing slash!
define('THUMB_DIR', 'data/thumbnails');

function is_remote($file_name) {
  return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
// Set thumbnails to show
$new_thumbs = 3;

// In following query CHANGE 4images table PREFIX if it doesn't match (Standard "4images_")!
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file
        FROM 4images_images a, 4images_categories b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat=0
        AND b.auth_viewimage=0
        ORDER BY a.image_id DESC
        LIMIT $new_thumbs";
$result = $db->sql_query($sql);
$newpics = "\n<table><tr>\n";
if ($db->sql_numrows($result) > 0) {
  while ($row = $db->sql_fetchrow($result)) {
    $image_id = $row['image_id'];
    $cat_id = $row['cat_id'];
    $image_name = $row['image_name'];
    $thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
    $newpics .= "<td valign=\"bottom\">$image_name<br><a href=\"".SCRIPT_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"1\" alt=\"$image_name\"></a></td>\n";
  }
}
else {
  $newpics .= "<td class=\"mainmenu\" align=\"center\">nothing here</td>\n";
}
$newpics .= "</tr></table>\n";

echo "$newpics";




$new_thumbs = Anzahl der anzuzeigenden Bilder / Number of Pictures

ÄNDERE DEN PFAD ZU 4IMAGES / EDIT THE PATH TO 4IMAGES

Dort wo ihr die Bilder anzeigen wollt fügt folgenden Code hin / put this code in your WP-Theme where u want the pictures to show: <?php echo "$newpics"; ?>


VOILÀ!!

73
Mods & Plugins (Releases & Support) / Re: [Mod] Mini-Top
« on: April 05, 2007, 09:21:00 PM »
in addition to that, i got a question.

the mod shows the best image either by votes, ratings, comments, hits or random.

i would like to show the REAL BEST IMAGE (the best image of all categories) so i need to combine all the data to find it out. how would i do that?  :roll:

74
Mods & Plugins (Releases & Support) / Re: [Mod] Photo Of The Day
« on: April 05, 2007, 09:16:45 PM »
this mod works definetly with 4images 1.7.4 !! though, there is still one bug which causes in the newer versions problems with the mysql queries, wich were mentioned before. here is the work-around i found (http://www.4homepages.de/forum/index.php?topic=5874.msg74179#msg74179), because the author of the script hasnt done this update in all of his scripts yet.


OPEN
includes/functions.php

FIND (in my functions.php at line 578)
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c

REPLACE WITH
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

THATS IT!! - SAVE AND UPDATE FILE ON SERVER

75
Mods & Plugins (Releases & Support) / Re: [Mod] Mini-Top
« on: April 05, 2007, 08:49:27 PM »
I got the following error messages, when installing the mod to 4Images 1.7.4:

An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.



I solved the problem by fixing the mini_top.php with the following:

Hi mstgokcen,

follow the link below for an explanation why this error occurs. If you are using 4Images with MySQL 5.0.12 or higher it should solve your problem.

http://www.4homepages.de/forum/index.php?&topic=3102.msg71831#msg71831

So this is what you have to do:

In top.php find the 4 SQL-queries producing the error-messages in your post and change them as described in the link. You will have to change in each query

[qcode]... FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c LEFT JOIN ...[/qcode]

to

[qcode]... FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c) LEFT JOIN ...[/qcode]

I hope this will do the trick.

e-trader_2002

PS:
This error may occur in other PHP-modules of 4Images as well. Identify the PHP-module by looking at the URL-entryfield of your browser:
Quote
http://www.domain.xy/4images/index.php?sessionid=...

Always find the related SQL-query (best done by searching for the string LEFT JOIN) in that module and do the modification described above.

works fine now!

Pages: 1 2 3 4 [5] 6 7