Buck Anderson - DNN Professor Member Login
July 30, 2010

Our Products  

Business Directory 6.1

from DNN Professor

View Details View Business Directory 6.1 Reviews

Easily add Business Directory listings to your DotNetNuke website! This, XMod powered DNN...

From: $97.00

Review IT!

from DNN Professor

View Details View Review IT! Reviews

Easily add Music, Movies, Products, Software, and Service Reviews to Your DotNetNuke website!...

From: $97.00

Move My Inventory!

from DNN Professor

View Details View Move My Inventory! Reviews

Get Results by presenting your product inventory and services in a unique and professional way...

Price: $97.00

ForumsDNN Professor Forums

DotNetNuke Forums | Xmod Forums | Internet Marketing Forums | DNN Professor Product Forums

Product Support and Product Forums Registration


Subject: Listing preview, possible?
Prev Next
You are not authorized to post a reply.

Author Messages
taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

07/28/2009 6:47 AM  

Hi Buck,

Just upgraded to BD6.1, things look great! :)

i wonder if BD6.1 able to let user preview their listing before submit?

sometimes users do not know where exactly the "Listing Title" will appear, hence, they cant judge a good wording to fill for that field..

And, how should i use or to test for whether current user is registered?

i like to make some contents available to registered (currently logged-in) users only. Thx.

 

 

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

07/28/2009 9:32 AM  

 Hi taetsu,

Currently XMod, due to the structure of the forms, templates, and approval does not include the ability to preview. I will be working closely with Kelly Ford, developer of Xmod, on XMod version 6 that will be released later this year.

I will bring your request to his attention.

In regards to testing for a registered user, are you asking as a general test for DotNetNuke or specifically for an XMod application?

If specific to content within an XMod application, FatGeorge has an Xmod add-on named Custom Template Tags v2.1 for XMod. One of the features of this add-on is the ability to test if a user IsInRole. If the user IsInRole you can show them a subset of the XMod content based on the roles you assign to the IsInRole if statement.

Best regards,
Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

07/28/2009 1:28 PM  

Hi Buck,

Good to hear that preview will be considered for next version.

As for the test case, I just like to test against DNN, whether the user is registered (logged-in) or not...

 

the scenario as simple as:

If user logged-in to the portal, show content A

If user not login, hide content A

how can i achieve this in Xmod listview/detailview template?

 

And also, how can i show/hide a content, by validating return of query:

example, SELECT Text FROM Lists WHERE ListName = 'Country' AND Value = 'MY'

if this query returns a row, i want to show the link, which is read as: "Malaysia"

else, this link will not be seen by user.

Possible?

 

FYI, I noted something in the add comment section, i was trying to modify the comment so that only current login user can submit comments, not anyone else. So i came to this line:

allowcomments="registered" numbercomments="1" commentsfrequency="minute" sortorder="NewestFirst" requireapproval="">

It works. n then i decide to use parameter for this, so, I tried to create a parameter named "gRreviewPermission" like following, in my form

when i reference it with >, it simply returns "" (empty)

i dont know why it failed, so i ended up just sharing the parameter with rating, which is >, n it works ok.. maybe you can shed some light on me..

 

It's 2am again.. i'll get some sleep now

hope to hear from you next morning

Gd night Buck

 

taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

07/28/2009 1:34 PM  

ah... the <> tags messed-up in html...

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

07/28/2009 4:52 PM  

As I mentioned, in the previous post, the only way to split template content data based on a role is:

  1. Use the FatGeorge Custom Template Tags add-on
     
  2. Create your own web service for a custom template control

    http://dnndev.com/help/xmod/Content/Template_Tags/_xmod_register.htm?SearchType=Stem&Highlight=Template|Templates|templates|template|TEMPLATE||Control|control|Controls|controls|CONTROL
     
  3. Create Custom Data Managers - http://dnndev.com/help/xmod/Content/Data%20Managers.htm?SearchType=Stem&Highlight=Custom|custom|customer|customers|customize|Customize|customized|Customer|customization|customizing

Currently Xmod can only use direct SQL calls in the form. This is explained in:

http://dnndev.com/help/xmod/Content/HowDoI/HowDoI_IntegrateXModWithMyDatabase.htm

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Xmod Comments are handled by require approval or not require approval.

I have a parameter in the main form to set this named gUuserReviewApproval.

This allows you to moderate the comments before they go live on the site.

There is currently no function in Xmod comments to restrict the adding of comments by only registered users.

Here is the link to the Xmod online help on the subject:

http://dnndev.com/help/xmod/Content/Template_Tags/_xmod_comments_.htm

Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

07/28/2009 11:23 PM  

 

"There is currently no function in Xmod comments to restrict the adding of comments by only registered users.

Here is the link to the Xmod online help on the subject:

http://dnndev.com/help/xmod/Content/Template_Tags/_xmod_comments_.htm

Buck"

 

But i managed to only allow comments for registered users by modifying this attribute:

allowcomments="registered"

Once i changed this, user are forced to submit comments with their DNN user name instead of entering any name on their own.

Maybe you should look at that.

 

 

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

07/29/2009 9:22 AM  

 Hi taetsu,

Good catch!

The XMod documentation does not describe the allowed values for allowcomments.

The ratings and comment components were originally designed by a third party developer and adopted by XMod.

That is most likely why the documentation is a bit vague on this subject.

We are having many XMod MVP discussions on how we want to improve the ratings and comment functionality in the next version of XMod.

Thanks for sharing your testing results,
Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

07/29/2009 10:55 AM  

I also noticed that, it doesnt show how many users voted for the rating, hence, the user cant justify how accurate this rating was given. A number of users voted would help.

I guess this is not supported also?

 

Btw, thx for all your helps! I appreciate it very much.

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

07/29/2009 6:19 PM  

taetsu,

I spent some time today playing with some XMod undocumented configurations of the comments.

I assigned the allowcomments="registered"

I have been able to match a rating value to the user that submitted the comment.

You can see this in action at http://dnnprofessor.com/DNNDirectory.aspx. Click the more info button on the DNNdev listing and view the comment area.

This will at least render some acuracy of the rating count using existing XMod technology.

I will add total ratings to the XMod 6 wish list.

Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

07/30/2009 2:36 AM  

Hi Buck,

How do you show the total view count for each listing?

I try to do that but come to no clue..

 

I found a workaround to test for login user and conditionally display the content that i mentioned earlier.

[xmod:select mode="standard"]
[case value="[xmod:user type="current" field="username"/]" operator="<>" comparetype="text" expression=""]

      "content goes here..."
[/case]

[else]

     "You're not logged-in!"

[/else]
[/xmod:select]

 

I replaced the <> with [ ] so that it can be render here.

Test for user role seems not possible here, however, dirty method can be used like explicitly test for the username of the role, like "Administrator" or "Host" or "Taetsu", using the method above.

 

Just sharing.

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

07/30/2009 7:04 AM  

ViewCount is another feature of the FatGeorge Custom Template Tags add-on for XMod.

Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

07/30/2009 9:26 AM  

i got a problem, when user add logo image, the image doesn't resize to 150x150, it remained as it's original size. Thumbnail for logo is ok, it resized to 67x67.

I checked the form parameters, they are ok.

[parameter name="LogothumbSize" alias="LogothumbSize" default="67,67"][/parameter]
[parameter name="LogoimageSize" alias="LogoimageSize" default="150,150"][/parameter]

can you see what's wrong here?

taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

07/30/2009 9:59 AM  

I try to upload another picture which has larger resolution (636x484), it successfully resized to 150x114. But when i deal with this particular picture (226x96), it doesnt resize..

 

Here's the picture that failed to resize:

http://img29.imageshack.us/img29/914/rsrq.png

 

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

07/30/2009 12:08 PM  

I have been having similar results on some images due to the aspect ratio.The FatGeorge Fileupload control sees the height as within the parameter of the control size and maintains the aspect ratio. I have brought this to the attention of Tony at FatGeorge. We have been experimenting with FixedSize="true".

This parameter should keep the image at the width and height designated in the parameter but it does not on some images.

I find that I am resizing some images for the lister at times.

Maybe Tony can get time to look into the code and find a solution. He can also be contacted at http://fatgeorge.co.uk

FYI - I just released an article on adding view count to a list view template. You can view it here.

I also added total rating count to the list view template which you can view here.

Both view count and total ratings count were implemented using the FatGeorge Custom Template Tags Add-on for XMod.

The version on snowcovered.com is 2.1 and the new features are in version 2.5. This is a free upgrade in the patches and hot fix section after purchase.

Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/01/2009 11:02 AM  

I'm configuring the Advance Search Form now, it's working great!

 

Right now, upon user select a state, it will redirect and append a "&state=MyState" in the URL.

This is ok, but i like the cities option change as well after user select a state.

How can i make use of this state parameter to change the query of my city selectionbox?

I got my query ready and tested in .Net Visual Studio. I just do not know how to change the query for selectionbox base on the state parameter.

Can i do something like this?

MyQuery = "SELECT A,B,C...."

taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/01/2009 11:04 AM  
Can i do something like this?

MyQuery = "SELECT A,B,C...."

[select1 ref="cboCityLookup" appearance="minimal" query={MyQuery}]
Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

08/03/2009 9:31 AM  

Hi taetsu,

Maybe I am not understanding your question. In the advanced search form when you change the state it does run a query that changes the cites that match the state.

If you are working with countries other than the US, it does change the cities that match a specific region.

Both than allow you the option to query the list only on the State or the list can be queried on the combination of Country, State/Region, and City.

Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/03/2009 11:19 AM  

Does the city changes base on state?

I'm using states out of US. Maybe i should check again.

Will update you about my finding.

 

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

08/03/2009 2:03 PM  

They should.

If you go to http://dnnprofessor.com/DNNDirectory.aspx and click the advanced search link and select Australia, or United Kingdom, you will see it in action.

Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/03/2009 10:11 PM  

ok, i got it work now. I customized a few parts of the code, and i overlook the parameters setting on top of the form, that's why it didn't work. Thanks for building this form, it has almost all the filtering features that i'm looking for.

Now, I made the form into letting user select any category, or state, or city. All 3 boxes are visible to them at all time.

When user not selecting any state, the city box is empty. From what i'd observe from other sites, when user is not selecting any state, all cities should be listed. This is quite a common practice. Just a little suggestion.

example:

www.mysimplifieds.com/computers

taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/04/2009 5:09 AM  

how can i check for a file exists on server before i use them?

logo thumbnail is now enable for all listing, if there is any listing without uploading logo, it will display a frame with big cross there. I need to handle this.

i need to pre-enable all logo thumbnail bcoz users often complain they cant display their logo, and usualy it was user who did not check the show thumbnail option in the first place.

 

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

08/04/2009 5:56 PM  

You can modify the List View template and use an xmod:if statement to see if the form field FileUploadLogo exists.

[xmod:if name="FileUploadLogo"]Do Something[/xmod:if]

Note: arrows have been replaced with brackets for forum view.

XMod Online Help

Direct Link to XMod:if  Information

Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/05/2009 12:18 AM  
That fixed it! Thank you

taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/10/2009 11:18 AM  

Hi Buck,

I have a problem with [select] control.
I created a selection box "sel_A" with a few items listed, when user select the item, it will be added to "sel_B" using javascript

document.getElementById(XModForm{XMOD_ModuleId}.sel_B.optionsΎ]    = new Option(document.getElementById(XModForm{XMOD_ModuleId}.sel_A.value, document.getElementById(XModForm{XMOD_ModuleId}.sel_A.value,true,true)

at this point, it seems ok, the item is being added to the "sel_B" selection box, but when i submit the form, the validation failed, it says "please select a category".. (the item was already added and selected..)
and the selection box gets reset.


It failed everytime i try to submit the form. It works ok if i just use it with [items] tags in form design, but not on-the-fly and insert the items with javascript.

Any idea?

taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/12/2009 4:05 AM  

Hello Buck,

Can you please help me with the above issue?


I'm now using DNNP-6.1 Multiple Categories Form. When the listing has 1 or 2 categories selected it's ok.
The problem comes when the listing has 3 or more categories being assigned.

I don't understand how XMod works behind the scene, but why, when the listing has 1 or 2 categories, it is added to table KB_XMod_Index_VC50 with keyName = 'cboCategory', while, it has 3 or more categories, it is being added to KB_XMod_Index_VC100 with keyName = 'cboCategory'  ???

This is bugging me, because i use Advance search form to allow filtering of my listings, and the listings that have 3 or more categories won't be display by this form.
Of course, it was added to entirely different table already. (Advance Search Form's SQL looks for table KB_XMod_Index_VC50..)

So, can you please tell me how do i solve the situation here..

I need a multiple main category + multiple sub-category solution for my system to work.
So i need to develop a new category system myself. (something like Sub-categories Form, but added a box to contain user's selection. But then, the [select] control created another problem which i cant save the value as described in above post.)

I'm having big trouble as clients are after me and wanted this to be fixed now..

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

08/12/2009 10:16 AM  

 Hi taetsu,

When a XMod form is submitted, it is parsed by field size and the input data is stored in the Xmod tables based on field size (VC50, VC100, etc.).

Although XMod's data is stored as XML, is it stored in a database and all of the actual field values are indexed in search tables to make queries (searches) fast. The indexed tables are further optimized by size, so smaller field values are stored in smaller, lighter, indexing tables.

The scanario, you describe, was not anticipated when we created the Advanced Search form.

The advanced search category dropdown field is only allowed to return 1 item and 1 value from a call to a SQL select statement.

I am in conference with Kelly Ford, developer of Xmod, in regards to the best method to rewrite the SQL select statement to ensure that all categories will be propagated within the category dropdown box on the advanced search form.

I will post when I receive information back from Kelly.

Best regards,
Buck


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/12/2009 10:23 PM  
Hi Buck,

how about the [select] control problem?
DNN ProfessorUser is Offline

DNN Active Member
DNN Active Member
Posts:34

Send This Member a Private Message

08/13/2009 11:21 AM  

 Hi taetsu,

You are working with customizations that i did not write and cannot support.

If you are having a validation issue on your custom code, try removing the select box validation and test if it works.

XMod Validation reference:
http://dnndev.com/help/xmod/Content/Form_Controls/_validate_.htm

In regards to the advanced search form. save a copy of the existing form and then try:

  • Hard code the category select to include all of your categories and then remove the SQl statement from the select.

Here is a XMod reference for you:

http://dnndev.com/help/xmod/Content/Form_Controls/_select1_.htm

Buck

taetsuUser is Offline

DNN Newbie
DNN Newbie
Posts:23
Send This Member a Private Message

08/13/2009 1:47 PM  

 Hi Buck,

Removing validation wont work. It's not the problem of validation itself, it is the problem of [select] control.

It just wont save or see any data that is being added/altered after the page posted (eg: add some items using javascript)

 

The references that you posted they came along with Xmod packages, i'd read plenty of times before and none of them really help in this situation.

This problem is in regards to XMod, it is not ASP.Net or clientside script that i can debug and try to overcome.

It is beyond my control. I cant proceed from here.

Some one has to attend to this issue.

 

Hardcoding the categories doesn't sound good to me either.

You are suggesting me to forget the refilling of a gas stove, and make a fire with some sticks instead.

We have hundreds of categories to maintain. The maintenance job would killed us. Hope you understand.

 

I really hope that the problems can be solved. Buck.

 

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:611

Send This Member a Private Message

08/13/2009 2:10 PM  

Yes, you are correct that it is an Xmod development and module code question.

I believe, at this point, the only one that knows the inner workings of Xmod module source code is Kelly Ford, the developer of Xmod.

I need to refer you to him for guidance since only Kelly has the understanding of the XMod form parsing code.

It may be possible that he will suggest attaching the customized JS code routine to the submit button to ensure that it runs on submit.

Kelly can be contacted at:

http://dnndev.zendesk.com/login

Buck

 


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


You are not authorized to post a reply.
Forums > Product Forums > Business Directory > Listing preview, possible?



ActiveForums 3.7

Copyright 2004 - 2010 by Jive Media Group LLC. All Rights Reserved.  | Terms of Use | Privacy Statement | Email White Listing | Site Map