What is vldPersonals?

vldPersonals is a very easy to use dating/social software. It allows you to create a fully functioning & modern dating website in a matter of minutes. If You think it's too complicated - check vldPersonals!
Know more about how You can become a dating website owner

What is vldCrowd?

vldCrowd.com is the biggest unofficial community of vldPersonals owners. It is a place to share ideas and thoughts about Your dating website. It is a place to answer questions and receive answers.
Do You own a vldPersonals license? Don't hesitate and join!

Connect Today

Community members help each other to take their dating websites to the next level. Can You make your vldPersonals website better? Join and find out...

Connect With More Than 500 Dating Website Owners! Sign Up Today
Please sign in or sign up to be able to access this page.
802 1 1
Today (Jan 30, 2010) I was chatting with Ramil about the latest mod he did for me. In doing so, I learn I was doing custom pages all wrong. I was blown away by what I learn from Ramil and realized that even though my custom pages worked, I was doing it all wrong.
 
Hopefully this tutor will explain the right way to do custom pages for 2.5.x versions of vldPersonals.
 
FIRST WAY THE EASY WAY (I call this CP Custom Page):
 
There are two ways of doing custom pages. The first way is straight forward and usually gives no one any problems because out of the box there are examples in the Control Panel (CP) of how to create custom pages (see for examples: Terms of Service, Offline message, etc, in your CP).
 
The following image may better explain the first way (note: the image may not look exactly like your custom page)
 

 
SECOND WAY (I call the External Custom Page)
 
As I said in the image above, you use the Custom template field for the other way to create a custom page. This is where I discovered from talking with Ramil, I was using the concept of this field incorrectly, even though my way worked, it was inefficient.
 
Lets look at an image that is using the Custom template field:
 

 
My big mistake in using an external custom template was that I was including the text for the body in the external custom template and leaving the page field in the CP custom page blank. This still worked, but it was very inefficient.
 
A better way is to type your text in the Page field and create an external custom template that formats the text in the Page field the way you want. This way I can use the same external custom template to format all custom pages I want formatted in the same way.
 
For example on my site, I needed to create an external custom template to format my articles -- the reason I needed to use an external custom template was so I could use a banner call for adsense and also I had to strip some of the standard coding from the default template (will talk more about default template later) so it formatted correctly in internet explorer. If I would of used the CP without the external custom template to create my custom page, I would of not been able to format my custom page properly for IE or use the banner calls.
 
Once I create an external custom template in the format I want, I can use it over and over to format all articles in the CP by using the same custom template name in the Custom template field. This is much more efficient than the way I was doing it.
 
DEFAULT TEMPLATE
 
When you use the CP to create your custom page, it uses a default template to format that page. This template is located in your template folder (I'm using pink2) called page_default.tpl. One of the best ways to help you create an External Custom Template is to copy the page_default.tpl and name it something else. In this tutor, I named it page_article.tpl. You do not want to rename or delete the page_default.tpl since this is the default template used to format all custom pages created in the CP.
 
After I copied page_default.tpl to page_article.tpl, I could play around with the coding in page_article.tpl to format my custom pages for articles. In my case, I had to strip out some of the coding to get adsense to display correctly in IE.
 

 
THE CODING
 
If you use the default coding from page_default.tpl for you external custom template, you probably won't go wrong but if that is all you are going to use, than don't use the Custom template field, just create your custom page in the CP and save it and it will use the page_default.tpl coding for your custom page by default.
 
Some reasons to use a external custom template would be to place a call in your template -- like: {members:limit=22,photos=1,cache_time=0,cache_name="new"} to call new members in a template or the banner call: {banners:group="hometopp"}, etc (note that the above call may not work on your site since I'm using a heavily modified 2.5.3 vldPersonals script).
 
Maybe you want to do some fancy coding, use a different header, menu, etc. The reasons for using an external custom template is as varied as there are websites that use vldPersonals for a variety of different websites from dating to blogging.
 
PAGE CALLS
 
I believe using a Page call to display your custom pages in a template is new in 2.5.5. I'm using 2.5.3 and Ramil did a mod for me to use some of the same features as 2.5.5 but better (I have RSS as well and some other goodies that only Ramil's mods can do).
 
A standard page call may look like this:
 
{pages:limit=10,tag="articles",separator="<br/>"}
 
I put this Call in my header.tpl to display a link to my Articles on the side of my home page (remember I'm using 2.5.3 and believe 2.5.5 now has a separate tpl for sidebar).
 

 
So lets examine this call: {pages:limit=10,tag="articles",separator="<br/>"}
 
limit=10 means it will display 10 articles.
 
tag="articles" - look at the above Screen Shot of External Custom Page and you will see the Custom tag field. In that field I used the name articles in the Custom tag field. If you look at the above call it uses the tag="articles" so all custom pages with the custom tag of articles will be displayed together (in my case 10 will be displayed). You can categorize your articles by using different tag names. For example, you could create a tag called male and put all Male Articles together or a tag called female and put all Female Articles together, etc. It's up to you.
 
separator="<br/>" is how the articles are separated in the list. The <br/> tag will put a return after the article so they will be listed like this:
 
Article 1
Article 2
Article 3
etc.
 
You can use different separators. I think the default separator is |
 
That is pretty much it. As I said, Ramil did a mod so I could use custom pages for 2.5.3. I call the mod SEO Custom Page Mod in case you want to ask Ramil about it. He included some extra goodies in my mod like a title tag and RSS. You want to see what the RSS looks like, just click this link:
 
http://www.asian-wife.net/index.php?m=pages&tag=articles&p=rss
 
Cheers
Dan

Comments

sowers

  • Posted on 05/25/2010 04:56 AM
Hello, can you provide the code. htaccess, you are used to create pages like this:
 
http://www.asian-wife.net/asian-love.html
 
http://www.asian-wife.net/wrong.html
 
thanks attention

Log in to leave a comment