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

Pages: 1 2 [3] 4 5
31
Ok. Did that. Still the same thing. The break is there from the template, but the av is not. As before, when I make a comment, the {comment_user_avatar} shows up, then upon a refresh, even it disappears.

http://www.lonewolf-grafix.com/sample4/details.php?image_id=25

32
Edit:

Ok, guys, I have found a solution to display user's avatar in phpBB when displaying 4images comments. I.e. user avatar is uploaded using the profile editing in phpBB...

inspired by: Using Phpbb3 Avatars In Custom Pages - http://www.volasail.com/2008/04/using-phpbb3-avatars-in-custom-pages/

by no means it's a effective or elegan solution. please feel free to modify and amend. Please let me know also so I could modify my code in this message.

here is what you do...

Step 1.

in details.php find:
Code: [Select]
if ($image_allow_comments == 1) {
ADD after:
Code: [Select]
//comments avatars variable initiate
require_once(ROOT_PATH .'includes/phpbb_sessions.php');
        // for using the phpBB function (I could not make it work...) you will see below
//require_once($phpbb_root_path.'includes/functions_display.php');
//comment avatars variable initiate end

Step 1.1
then find:
Code: [Select]
$comment_user_id = $comment_row[$i]['user_id'];
and ADD after:
Code: [Select]
   //sql for comments avatars
    $sql2 = "SELECT user_avatar, user_avatar_type, user_avatar_width,
    user_avatar_height FROM phpbb_users
    WHERE username = '".$comment_row[$i][$user_table_fields['user_name']]."'";
    $result2 = $site_db->query($sql2);
$row2 = $site_db->fetch_array($result2);
    //sql end comment avatars
        if (empty ($row2['user_avatar'])) {
//the following line uses the phpBB built-in function to return avatars, but I could not get it to work...
                //$comment_user_avatar = get_user_avatar($row2['user_avatar'], $row2['user_avatar_type'], $row2['user_avatar_width'], $row2['user_avatar_height']);
$comment_user_avatar = "";
}
else {
$comment_user_avatar = "<img src='".PHPBB3_URL."/download/file.php?avatar=".$row2['user_avatar']."'>";
        }  

Step 2.
in comment_bit.html (within your template folder)

find:
Code: [Select]
<b>{comment_user_name}</b><br />
and ADD after:
Code: [Select]
{comment_user_avatar}<br />
That's it for standard installation of 4images.

if you use reply to Comments like on YouTube MOD - http://www.4homepages.de/forum/index.php?topic=23498.0
then continue

Step 3.
in details.php find:
Code: [Select]
$response_row = $site_db->query_firstrow($sql);
and ADD after:
Code: [Select]
//sql for comments response avatars
    $sql3 = "SELECT user_avatar, user_avatar_type, user_avatar_width,
    user_avatar_height FROM phpbb_users
    WHERE username = '".$response_row['response_user_name']."'";
    $result3 = $site_db->query($sql3);
$row3 = $site_db->fetch_array($result3);
//sql end for comment response avatars

          if (empty ($row3['user_avatar'])) {
 $response_user_avatar = "";
          } else {
                  $response_user_avatar = "<img src='".PHPBB3_URL."/download/file.php?avatar=".$row3['user_avatar']."' width='50' height='50'>";
 }

Step 4.
find:

Code: [Select]
$responses .= "<tr>\n<td><b>".$lang['response'].$response_user_name."</b> (".$response_user_info.")</td>\n";
and REPLACE by:

Code: [Select]
$responses .= "<tr>\n<td><b>".$lang['response'].$response_user_avatar.$response_user_name."</b> (".$response_user_info.")</td>\n";

After doing the bridge, I have done this, but nothing is showing up. Not even errors!

is there another step that wasn't included here?

I am also using the AJAX comment form MOD.

I wouldn't think that'd interfere, would it? None of the above coding was anywhere within any of the AJAX coding.

33
Maybe this will help... sounds like a similar situation.

http://www.4homepages.de/forum/index.php?topic=24054.0

(in fact, dailymotion is one of the listed formats!)

34
Works like a charm so far in 1.7.9!

35
Mods & Plugins (Requests & Discussions) / Re: fancybox integration
« on: April 20, 2011, 07:37:43 PM »

Step four:
Open /templates/<your_template>/details.html
Replace
Code: [Select]
{image}With:
Code: [Select]
<a href="./data/media/{cat_id}/{thumbnail_file_name}" id="imagine" title="{image_name}"><img src="./data/media/{cat_id}/{thumbnail_file_name}" {imag_size} /></a>

Wouldn't that work better in the /templates/<your_template>/media/<your file type.html> better?

Not all files will be images. Some will be videos or music and may have a different script to view them, ala media players.

EDIT:

Also, you might not need to do all of that if you already use this. IF you have that already MODDED into your 4Images, then this is all you need to do:

1. Install fancybox (follow their instructions)

1a. When they tell you to place the script info above the /head tag, go to your /templates/<your_template>/header.html and do it there.

2 Open /templates/<your_template>/media/<your file type.html>

FIND, depending on what set-up you have to view the image:
Code: [Select]
<img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br />
ADD or REPLACE with this-
Code: [Select]
<a id="single_image" href="./data/media/{cat_id}/big/{image_file_name}" title="{image_name}"><img src="{media_src}" border="0" alt="{image_name}"{width_height} /></a>
Yup. It works like that...

CLICK HERE

36
EDIT: (original post I made) Never mind.

(new content in this post) Got it working with the original coding. Good to see it works in hte latest 4Images :)

37
Thanks for the heads up!

38
That, sir, did the trick. Thank you very much!

One thing users will need to keep in mind- The main settings file types MUST BE KEPT and MATCH what you put in the category file types (only once overall though, ie I put mpg into the master list, and have two categories that can upload mpg. I do not need to add mpg twice to the master list).

The reason is so they will show up. If you remove the file type from the main settings, then it shows the file cannot be found, so leave the "master" list intact with what types you want to allow. Much easier this way than to try and re-code the entire 4images script  :lol:

This categories thing DOES make it so only certain types can be uploaded into certain categories though, which is EXCELLENT! You can leave a TOP category blank, and have the sub-cats upload certain types of files.

Example: I have a top category named "Videos". Since I do not want any files uploaded to the top category, I can leave the file types blank for that category. I then have two sub-cats (SciFi videos and Music videos) under that top category. I set each of them for different file types, and those two categories will upload only what I set it for.

39
That fixed it! Thanks. Have set some permissions and will do some testing.

Looks great so far!

EDIT:

Ok... the permissions are NOT working.

It seems the main Settings are over-riding the Category settings. Yet if I remove the main settings, then NO images will show up at all.

I had a main cat set for youtube,avi,flv,mp4 I then set a sub-cat for mpg only.

I then tried to upload a jpg (ie, none of the "allowed" category formats) yet it still uploaded! I did this as both a regular member and visitor status.

I have checked my database, and the entries ARE there for the category file types.

I am wondering if there is yet another piece of code that needs edited, maybe in the upload.php or member.php file (other than the code posted)?

40
It's not showing up in the Add Category, but does in the Edit Category.

I did notice this is:

From the Add Category section of your code
Code: [Select]
//############## Allowed Mediatypes in Categories ###############
  show_input_row($lang['cat_mediatypes'], "cat_mediatypes", $row['cat_mediatypes'], $textinput_size);
//############## Allowed Mediatypes in Categories ###############

is different than this:

From the Category of your code
Code: [Select]
//################ Allowed Mediatypes in Categories ###############
  show_input_row($lang['cat_mediatypes'], "cat_mediatypes", $cat_row['cat_mediatypes'], $textinput_size);
//################ Allowed Mediatypes in Categories ###############

I tried using the second code where the first one is, and it still didn't show up.

I also notice two of your code entries in your #2 (the second search/replace code in step 2) post are backwards :D

41
You're my hero LOL Thanks!

(and I've been around for a while... just rarely post because I can generally figure out what I'm doing, but sometimes a helping hand is needed!)

42
You have this in the media-sites.php:

	
"youtube"          => array("#^http://([^.]+\.)?youtube\.com/(watch_private|watch)\\\\?.*[?&]v=([^&]+)#",
	
	
	
	
	
3,
	
	
	
	
	
"http://www.youtube.com/v/{ID}",
	
	
	
	
	
null,
	
	
	
	
	
MS_BBCODE_YES,
	
	
	
	
	
"http://www.youtube.com",
	
	
	
	
	
"http://img.youtube.com/vi/{ID}/default.jpg"//works
	
	
	
	
),


I have found that
Code: [Select]
http://img.youtube.com/vi/{ID}/hqdefault.jpgwill produce an image much larger than the default thumb youtube provides.

I changed your above code to hqdefault.jpg.
How would I write an IF command in there, if the hqdefault.jpg image doesn't exist, then it can go with the normal default.jpg image?

43
I've searched the forums for this, but either I am not using the correct search words, or it doesn't exist (yet).

Is there a MOD already for this, and if not, does anyone know how to do it? Is it possible?

I have three top, main categories:

Videos, Images and Music.

What I want to do is restrict what type of content is uploaded into EACH category.

Meaning... only AVI, MPG, MOV, MP4, Vano's GREAT external sites MOD (youtube, etc) into the Video category, restricting the uploads of images (other than thumbs, of course) and music.

Then for the images category, make it so only images can be uploaded, so no video formats or music formats.

Then do the same for the Music Category.

Each would have sub-cats too, so they'd need to inherit the parent category restrictions.

Can this be done?

44
Discussion & Troubleshooting / Re: Problem with uploading rar-files
« on: May 29, 2008, 04:43:28 AM »
Been getting that error in Firefox as well.

45
Disregard. I dunno what the problem was, but I have tested it repeatedly with a non-admin handle and it works like it's suppose to.

Pages: 1 2 [3] 4 5