Register   Login
     
  Latest Posts  
News Articles Read more page uses admin skin
by kfarrell on 11/22/2008 8:56 AM
RE: List Properties by User
by aviavia on 11/22/2008 7:03 AM
List Properties by User
by rodneyjoyce on 11/22/2008 6:44 AM
[RSSLINKENCODED] request.
by aviavia on 11/22/2008 6:41 AM
RE: Date Type
by rodneyjoyce on 11/22/2008 3:26 AM
Date Type
by rodneyjoyce on 11/22/2008 3:21 AM
Default Location Data
by rodneyjoyce on 11/22/2008 3:06 AM
RE: AutoFill fields by selection Type
by rodneyjoyce on 11/22/2008 3:05 AM
RE: SEO for listing view
by rodneyjoyce on 11/22/2008 3:04 AM
RE: Comments questions
by macounwr on 11/22/2008 2:28 AM
  Forums  
Subject: [AGENT:Image] how set up?
Prev Next
You are not authorized to post a reply.

Author Messages
CodepointUser is Offline
Gold Membership
Nuke Wiz
Nuke Wiz
Posts:140

3/19/2008 11:09 AM  

Hi, I know that AGENT token is linked to the owner profile of the property. I've seen it is used with image field, but how I can add the image to the DNN user profile? I don't find the image property details in my DNN user profile.

avi aUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:653

3/19/2008 11:23 AM  
There was a free module which let you do that.
The bad news is that the site where you could get it is no longer available.
The other bad news is that I've heard from Scott that even if you could get it from some one here, it doesn't work with new versions of DNN.
What you can do:
1. Purchase a module which support that feature.(like dynamic registration).
Or
2. You can ask your "agent" to just provide a link to the image.

In both cases you will still need to put the link/path to the image inside that or another image tag/script.

Avi A
Nukedesigners.com W3C valid skins for dotnetnuke
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12446


3/19/2008 2:49 PM  

Hey guys, I'm not sure if it will work in the latest DNN version, but I actually found the installs.

I've attached them if you want to try it, make sure it's on a test environment.


Attachment: 21FiveIndustries_User_Profiles_Src.zip
Attachment: 21FiveIndustries_User_Profiles_PA.zip


Scott McCulloch
Site Administrator
gpUser is Offline
Silver Membership
Nuke Active Member
Nuke Active Member
Posts:42

3/20/2008 5:48 AM  
I'm having the same challenge. If you do the link do you just create a new user profile field, eg PictureLink?
gpUser is Offline
Silver Membership
Nuke Active Member
Nuke Active Member
Posts:42

4/08/2008 2:51 PM  
I just created a new user profile field called PictureLink and I give it the path for the image, then include [AGENT:PictureLink] in whatever layout file I need. Seems to be a good workaround.
bennyjUser is Offline
Gold Membership
Nuke Addict
Nuke Addict
Posts:72


4/09/2008 2:02 PM  
Posted By gp on 4/08/2008 2:51 PM
I just created a new user profile field called PictureLink and I give it the path for the image, then include [AGENT:PictureLink] in whatever layout file I need. Seems to be a good workaround.



Have you figured out a way to control the size of the photo being uploaded?

avi aUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:653

4/10/2008 12:57 AM  
You or any one else is welcome to try to use that link. Replace the PATH_TO_IMAGE with the url of your image and the xx with the max width and height. It will keep the ratio. Style it any way you like. let me know if it works? (or not)?
< div style="float: left; padding-right: 12px;" > < img src="http://www.nukenotes.com/Portals/_default/Skins/slideshowboutique/images/jIR.aspx?s=PATH_TO_IMAGE&h=XX&w=XX/" alt=""/ >< /div >

(don't forget to close the spaces.)

Avi A
Nukedesigners.com W3C valid skins for dotnetnuke
avi aUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:653

4/10/2008 2:42 PM  

Here is an example:

example with logo


Avi A
Nukedesigners.com W3C valid skins for dotnetnuke
Shawn O'ConnorUser is Offline
Gold Membership
Nuke Super Newbie
Nuke Super Newbie
Posts:23

5/27/2008 9:38 PM  

I recently went down this road trying to 1.) figure out how the AGENT:image token works and then 2.) finding that it was designed for a profile attribute in DNN that doesn't exist.  Bummer.

I did find a workaround though and I thought I'd contribute my solution.  Hopefully it will help someone else. 

In reviewing the forums I found the Module from Scott that is supposed to add a "photoupload" propertydefinition.  This works, but for some reason when logged on as administrator I'm not able to use this function.  I get some worthless javascript error on the page.  However, when logged in as the user of the profile, it works great.  This is running against DNN 4.8.2.  (Anybody want to take a stab at explaining this and how to fix?)

However, I wasn't done yet.  I wanted to distinguish between a buyer, seller and broker.  Buyers get to browse the listings and view.  Sellers get to post 1 listing.  Brokers get to post as many listings as they want.  However, I also want brokers to be able to upload their picture or company logo as part of what they get when they subscribe to the site.  AND to have their logo appear on every property they post.  However, Sellers shouldn't have this opportunity.  How to do?

The Property Agent, to my knowledge, doesn't let you show different fields for data entry based upon a user's profile so if I give one group a capability then they all get it if they have the privelege to add listings.  I decided to use Data Springs Dynamic Registration module to finish out what was needed.  I went down this road because core DNN registration, to my knowledge, won't let you assign a specific role to someone at registration.  How could it know?  You can autoassign a role, but there's only one instance of the registration page so I don't think there is an easy way to pass along that based on a form selection a given user should be assigned a Role of X or Y.  I also couldn't figure out how to make the registration process flow from acquiring the basic "preferred user" info to the collection of everthing else including the logo.  It does it, but it takes a few more steps than I wanted.  I started out using Scott's Subscription tool, but I had some issues there as well (including being tied to the DNN registration page) - so a little difficult to understand how to modify/update a profile for a new user.

Anyway, using the Data Springs module I'm able to have multiple "instances" of a registration page that are predefined for a given group -- so when a user signs up to be a Seller or Broker it directs that person to the appropriate registration module where they are automatically signed up to a specific role.  Moving right along -- I was able to then create a custom instance of the registration module for Brokers that offers the ability to upload a logo.  The Data Springs module can handle this without the PA that Scott put out there, but it has a problem also.  Scott's code for Property Agent is looking at the core DNN profile.  I suppose one could modify Scott's code to look at where Data Springs puts the name and path for the logo graphic -- but I took a peak and it looks painful to modify.  Anyway, I decided it was best to keep things in the Core if possible.  Fortunately the Data Springs module also has the ability to trigger a SQL update based on an event in the Registration form.  So I set this up to update the Core DNN table where the photo path would get stored so that the Property Agent could find the path for the graphic and load it onto the page.  Works like a champ!  (although there isn't a way to specify the size of the image or use a combination of thumbnails and larger images to enhance the page; not something I really need, but nice to have.)

What I like about this mostly is that I'm able to provide for and display fields in Property Agent that aren't tied to all Roles that have Data Entry priveleges.  Scott mentioned in a post that he would probably just provide a field in the Property Agent that would handle the Agent:image -- that is definitely the way to go.  However, if I had a wish it would be to separate out what users are able to input in the data entry form based upon their Role.  AND to have greater control over how the data entry form looks.

Well, if you made it this far through my narrative you must have found something helpful.  Good luck.  And after reviewing this post if you found another way to accomplish some or all of this let me know.  It may be that Property Agent or Subscription Tools does some of what I wanted after all and I just couldn't see the forest through the trees.


Shawn O'Connor
http://www.idsconsulting.com
Ideas, Design, Success...

Specializing in site design using dotnetnuke.
GlenWinUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:711


8/22/2008 5:14 AM  
Posted By Scott McCulloch on 3/19/2008 2:49 PM

Hey guys, I'm not sure if it will work in the latest DNN version, but I actually found the installs.

I've attached them if you want to try it, make sure it's on a test environment.

Is anyone else has  a solution for this ??

Hi Scott,

I am using DNN4.8.3 and I hust founs out that this image upload no longer work ...It used to work fine in DNN4.8.2 .

I tried to reinstall the zip file but got this error:

StartJob Starting Installation
StartJob Reading files
Info Loading 21FiveIndustries - User Profiles.dnn
Info File 21FiveIndustries - User Profiles.dnn read successfully
Info Loading dummy.ascx
Info File dummy.ascx read successfully
Info Loading ReadMeFirst-PA.txt
Info File ReadMeFirst-PA.txt read successfully
Info Loading 21FiveIndustries.UserProfiles.dll
Info File 21FiveIndustries.UserProfiles.dll read successfully
Info Loading 03.00.00.SqlDataProvider
Info File 03.00.00.SqlDataProvider read successfully
EndJob Reading files done.
StartJob Reading DNN file
Info DNN file is in valid 2.0 SkinObject format.
Info xml loaded.
Info Loading files info
Info Loading Modules info
Info Loading Control info for '' module
EndJob Dnn load finished successfully
StartJob Begin Sql execution
Info Executing 03.00.00.SqlDataProvider
StartJob Start Sql execution: 03.00.00.SqlDataProvider file
Failure SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_Lists'. Cannot insert duplicate key in object 'dbo.Lists'. Violation of PRIMARY KEY constraint 'PK_Lists'. Cannot insert duplicate key in object 'dbo.Lists'. Violation of PRIMARY KEY constraint 'PK_Lists'. Cannot insert duplicate key in object 'dbo.Lists'. The statement has been terminated. The statement has been terminated. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) INSERT INTO dbo.Lists ([ListName], [Value], [Text], [DefinitionId]) Values ('DataType', 'CheckboxList', 'TwentyOneFive.UserProfiles.CheckboxListEditControl, 21FiveIndustries.UserProfiles', '-1') INSERT INTO dbo.Lists ([ListName], [Value], [Text], [DefinitionId]) Values ('DataType', 'PhotoUpload', 'TwentyOneFive.UserProfiles.PhotoUploadEditControl, 21FiveIndustries.UserProfiles', '-1') INSERT INTO dbo.Lists ([ListName], [Value], [Text], [DefinitionId]) Values ('DataType', 'FileUpload', 'TwentyOneFive.UserProfiles.FileUploadEditControl, 21FiveIndustries.UserProfiles', '-1')
EndJob End Sql execution: 03.00.00.SqlDataProvider file
EndJob Finished Sql execution
StartJob Creating files
Info Created D:\HostingSpaces\XDK012\vietinternet.com.au\wwwroot\DesktopModules\21FiveIndustries - User Dummy\dummy.ascx
Info Created D:\HostingSpaces\XDK012\vietinternet.com.au\wwwroot\bin\21FiveIndustries.UserProfiles.dll
Info Created D:\HostingSpaces\XDK012\vietinternet.com.au\wwwroot\DesktopModules\21FiveIndustries - User Dummy\Providers\DataProviders\SqlDataProvider\03.00.00.SqlDataProvider
Info Created D:\HostingSpaces\XDK012\vietinternet.com.au\wwwroot\DesktopModules\21FiveIndustries - User Dummy\21FiveIndustries - User Profiles.dnn.config
EndJob Files created
Info Registering Controls
EndJob Registering finished
EndJob
GlenWinUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:711


8/22/2008 6:04 AM  
Ok I have been dinging up more info in other forum posts and i found out that if I DISABLE AJAX in host setting then now I can upload or edit user images :-))
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12446


8/22/2008 6:05 AM  
When you say "Image Uploader No Longer work", do you mean it worked at one time? Did you reinstall the module?

Scott McCulloch
Site Administrator
GlenWinUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:711


8/22/2008 6:08 AM  
Yes i did reinstall the module but it did not complete the installation and got error. But now I temporary disabled Ajax and it work again . Not sure why
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12446


8/22/2008 6:11 AM  
Okay, if you re-enable ajax and make the changes mentioned in this thread, it should work again.


Scott McCulloch
Site Administrator
GlenWinUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:711


8/22/2008 6:17 AM  
but I dont have access directly to the database ... Can I do it via ftp ? If so which file ?
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12446


8/22/2008 6:28 AM  
You can do it in Host -> SQL

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12446


8/22/2008 6:28 AM  
Make sure you restart the application in host settings after doing it as well.

Scott McCulloch
Site Administrator
GlenWinUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:711


8/22/2008 6:33 AM  
Hehe , well this is where I stop. I dont know much about SQL unless some one give me the script to run it . otherwise i just disable Ajax for now :-)
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12446


8/22/2008 7:43 AM  
The sql is in the thread I pointed you to (this thread)

Scott McCulloch
Site Administrator
You are not authorized to post a reply.
Forums > Modules > Property Agent > [AGENT:Image] how set up?



ActiveForums 3.7