Hire us to design your site.
Jul
10
2012

Upgrade from 2.5.3 to 2.7

ULTIMATE NOTES TO UPGRADE FROM 2.5.3 TO 2.7. …..

the templates I use was Nightlife 2.7 from luvpoint:

(This tutorial is made of db3204 from vldcrowd.com)

When I upgrade my site, I keep notes. I thought I would share in case some of the coding and changes help others. These notes are for 2.7. I upgraded from 2.5.3. Currently I use NightLife template.

1. If you don’t want google to index or follow links, add this to the header.tpl:

<meta name=”robots” content=”noindex,nofollow” />

When I’m updating I do the above so google doesn’t hit me with duplicate content penalty while transferring files from an older site to a new one. Don’t forget to remove it after you upgraded your site.

2. I made notes of BBC and HTML especially for those who signed up when the site was 2.5.3. The 2.7 site uses BBC in the admin Welcome and Guestbook messages, but old 2.5.3 messages show the html code.

3. I moved the Sign Up image to the top of my site. Here is how I did it: — Working with 3 files: homepage.css – site.css and header.tpl

————————–

HOMEPAGE.CSS

————————–

— Copy & Cut (cut so you remove) the following code into your clipbaord to paste in site.css

div.intro a.signup {

margin: 10px 30px 0px 0px;

width: 193px;

height: 61px;

float: right;

display: block;

text-decoration: none;

background: url(‘intro_signup.png’) no-repeat; }

div.intro a.signup:hover {

text-decoration: none;

background: url(‘intro_signup.png’) no-repeat 0px -61px; }

div.intro a.signup span {

display: none; }

————————–

SITE.CSS — open site.css

————————–

FIND:

div#header {

background: url(‘header_haze.png’) no-repeat; }

AFTER ADD (I pasted the above CSS code and made changes — see code below for changes):

div#header a.signup {

margin: 20px 30px 0px 0px;

width: 193px;

height: 61px;

float: right;

display: block;

text-decoration: none;

background: url(‘intro_signup.png’) no-repeat; }

div#header a.signup:hover {

text-decoration: none;

background: url(‘intro_signup.png’) no-repeat 0px -61px; }

div#header a.signup span {

display: none; }

NOTE: Basically I pasted the above coding in site.css from homepage.css and made the above CSS class changes for div#header

————————–

HEADER.TPL

————————–

FIND:

<!– IF loggedin == “0” –>

{anchor:url1=”account/register/”,url2=”index.php?m=account_register”,name=”core|menu_register”,pre=”<span>”,pro=”</span>”,class=”signup”}

<div></div>

<!– ENDIF –>

<div></div> (NOTE: you can probably delete this clear class)

AND MOVE IT AFTER

<h1><span>{settings.app_title}</span></h1>

SO THE WHOLE CODE LOOKS LIKE THIS:

<div id=”header”>

<h1><span>{settings.app_title}</span></h1>

<!– IF loggedin == “0” –>

{anchor:url1=”account/register/”,url2=”index.php?m=account_register”,name=”core|menu_register”,pre=”<span>”,pro=”</span>”,class=”signup”}

<div></div>

<!– ENDIF –>

<div></div>

</div>

————————–

NOTES

Upload the changes you made to the 3 files and tweak. For example you may want to tweak the margins in div#header a.signup (#2 above) so it lines up the way you like.

One NOTE: In header.tpl notice this code: <div>{banners:group=”header”}</div> If you use the banner feature you may have to tweak the CSS code for banners above so it does not interferre with where you placed the SIGN UP code.

Also, when you login the signup button goes away, so you could setup the coding so a banner replaces the signup button when members log in.

4. Displaying the Username after member Signs in. The username will replace the Sign Up Image.

————————–

In header.tpl I did this:

————————–

<!– IF loggedin == “0” –>

{anchor:url1=”account/register/”,url2=”index.php?m=account_register”,name=”core|menu_register”,pre=”<span>”,pro=”</span>”,class=”signup”}

<!– ELSE –>

<a href=”{virtual_path}account/home/”> Hello {session.username}</a>

<div></div>

<!– ENDIF –>

————————–

Added another class to site.css

————————–

div#header a.signup2 {

margin: 40px 30px 0px 0px;

width: 293px;

height: 61px;

float: right;

display: block;

text-decoration: none;

font-size: 18px;

font-weight: bolder;

}

5. New Call in 2.7 I did not have in 2.5.3. The CALL calls the custom page and displays it. In this case, the call is calling the Welcome Message I see in the header of the site.

{page:label=”homepage_welcome”,template=”ext.page_welcome.tpl”,cache_time=0}

6. In 2.7 on the homepage, there is a javascript switch to dispaly new members, popular members, etc. This was new to me and I had to do the following to learn and play with it.

————————–

THE HOME PAGE CODING:

————————–

<div>

<div>

{members:limit=20,photos=1,cache_time=0,cache_name=”popular”,orderby=”ratings”,orderdir=”desc”}

</div>

<div style=”display: none;”>

{members:limit=20,photos=1,cache_time=0,cache_name=”new”}

</div>

</div>

Note: the key to making new members display first by default is style=”display: none;” Here is the coding change:

<div>

<div>

{members:limit=20,photos=1,cache_time=0,cache_name=”new”}

</div>

<div style=”display: none;”>

{members:limit=20,photos=1,cache_time=0,cache_name=”popular”,orderby=”ratings”,orderdir=”desc”}

</div>

</div>

NOTE: All I did was remove style=”display: none; from the new members call and put it with the popular members call. I probably did not have to switch the order of the calls but I did it to keep things lined up accordingly.

————————–

THE SWITCH

————————–

<h3>

<a href=”#” onclick=”switch_boxes(‘members_list’,’members_new’,1);return false;”>{lang:”core”,”home_latest_members”}</a>

<a href=”#” onclick=”switch_boxes(‘members_list’,’members_popular’,1);return false;”>{lang:”core”,”home_popular_members”}</a>

</h3>

NOTE: I switched the links/tabs for popular and new members. New member link now shows first.

————————–

POPULAR MEMBERS – adding to the switch

————————–

ADDED A NEW TAB:

<a href=”#” onclick=”switch_boxes(‘members_list’,’members_feature’,1);return false;”>{lang:”core”,”home_popular_feature”}</a>

ADDED THE CALL

<div style=”display: none;”>

{members:limit=20,featured=1,cache_time=0,cache_name=”feature”, orderdir=”desc”}

</div>

UPDATED THE LANGUAGE FILE: OPEN: lang.core.php FIND: “home_popular_members” =>

ADDED BELOW:

“home_popular_feature” =>

“Featured members”,

7. There may be times I want to put the image on the right side of the header. If I do, I need to move the text and sign up to the left. Here is how.

————————–

In hompage.css for text find:

————————–

div.intro div.text {

padding: 20px 20px 0px 0px;

float: right;

width: 490px;

color: #ffffff;

font-size: 12px;

line-height: 18px;

————————–

and for signup Find:

————————–

div.intro a.signup {

margin: 10px 30px 0px 0px;

width: 193px;

height: 61px;

float: right;

display: block;

text-decoration: none;

background: url(‘intro_signup.png’) no-repeat; }

————————–

MAKE CHANGES TO THE ABOVE AS FOLLOWS:

————————–

INTRO DIV.TEXT

— change float: left

— padding: 20px 0px 0px 20px

SIGNUP

— float: left;

— margin: 10px 0px 0px 30px

8. Getting Rid of “I’ll tell you later”

OPEN: member_profile.tpl

FIND: <!– BEGIN profile_fields –>

AFTER ADD: <!– IF field_value –>

FIND: <!– END profile_fields –>

BEFORE ADD: <!– ENDIF –>

NOTES:

— How do I remove the group heading when it is totally empty (for example http://www.asian-wife.net/anash — Lifestyle is empty)

— I would like a line break between Describe yourself and Your Match — I did it in 2.5.3 I just need to find my notes how I did it.

9. BBCode NOTES – In 2.5.3 I did not have BBCode so this is new to me. Below are my notes on BBCode

— BBC is at Settings – member modules – BBcode from drop down. By default it looks like they are all set to yes. It looks like BBC settings is for site wide. It would be nice to be able to control it for each member or group.

— includes/fns/fns.parser.php — looks like where you will find BBC coding. By looking at fns.parser it looks like the only bbc supported are:

$pattern = array(‘#\[b\](.*?)\[/b\]#s’,

‘#\[i\](.*?)\[/i\]#s’,

‘#\[u\](.*?)\[/u\]#s’,

‘#\[url\]([^\[<]*?)\[/url\]#e’,

‘#\[url=([^\[<]*?)\](.*?)\[/url\]#e’,

‘#\[email\]([^\[<]*?)\[/email\]#’,

‘#\[email=([^\[<]*?)\](.*?)\[/email\]#’,

);

— Adding MORE BBcode

—————————–

BBCode link open in new window

—————————–

OPEN: includes/fns/fns.parser.php

FIND: return ‘<a href=”‘.$full_url.'”>’.$link.'</a>’;

REPLACE WITH: return ‘<a href=”‘.$full_url.'” target=”_blank”>’.$link.'</a>’;

—————————–

BBCode for Images

—————————–

OPEN: fns.parser.php

FIND:

$pattern = array(‘#\[b\](.*?)\[/b\]#s’,

‘#\[i\](.*?)\[/i\]#s’,

‘#\[u\](.*?)\[/u\]#s’,

‘#\[url\]([^\[<]*?)\[/url\]#e’,

‘#\[url=([^\[<]*?)\](.*?)\[/url\]#e’,

‘#\[email\]([^\[<]*?)\[/email\]#’,

‘#\[email=([^\[<]*?)\](.*?)\[/email\]#’,

AFTER ADD:

‘#\[img\](.*?)\[/img\]#’,

FIND:

FIND:

$replace = array(‘<b>$1</b>’,

‘<i>$1</i>’,

‘<u>$1</u>’,

‘handle_url_tag(\’$1\’)’,

‘handle_url_tag(\’$1\’, \’$2\’)’,

‘<a href=”mailto:$1″>$1</a>’,

‘<a href=”mailto:$1″>$2</a>’,

AFTER ADD:

‘<style>#resized img {width:auto; max-width:400px;}</style><p id=”resized”><img src=”$1″></p>’,

TO USE:

[img]http://www.filipinaeyes.com/online-dating-gallery/quick_gifs/kiss.gif[/img]

—————————–

BBCode for Youtube

—————————–

OPEN: fns.parser.php

FIND: (note yours may not look exactly the same)

$pattern = array(‘#\[b\](.*?)\[/b\]#s’,

‘#\[i\](.*?)\[/i\]#s’,

‘#\[u\](.*?)\[/u\]#s’,

‘#\[url\]([^\[<]*?)\[/url\]#e’,

‘#\[url=([^\[<]*?)\](.*?)\[/url\]#e’,

‘#\[email\]([^\[<]*?)\[/email\]#’,

‘#\[email=([^\[<]*?)\](.*?)\[/email\]#’,

ADD:

‘#\https://www.youtube.com/watch?v=\

OR

http://www.youtube.com/watch?v=ifZK6bpuKaQ

10. Lining things up. It is always a challenge in vldP how thumbnails for images and video, etc, line up. The following are my notes:

— Remember if you change the size in the setting, the new image size will only take effect for images added after the size change. Be super careful of what you change for Thumbnails and Avatars or you may mess things up. If you change something, make note of what the setting is before changing.

— I made the following changes to line up the Global Picture Images

** Control panel – settings – member modules (left side) – pictures (drop down box) – picture gallery — change to 15

** OPEN: pictures.tpl and I changed this

<!– IF rowcnt > “0” AND rowlast == “0” AND rowcnt mod “4” == “3” –><div></div><!– ENDIF –>

(by default rowcnt was 6 5 and I changed it to 4 3).

** I did the same changes for the video gallery as I did for picture gallery — vido.tpl (change rowcnt) and settings – member modules – video – video gallery (change to 15)

11. Tweaking the Text in the Header — here are some notes on tweaking the text in the header of 2.7 NightLife template.

————————–

OPEN HOMEPAGE.CSS

————————–

— To change with width, change the width class below

div.intro div.text {

padding: 20px 20px 0px 0px;

float: right;

width: 550px;

color: #ffffff;

font-size: 12px;

line-height: 18px; }

NOTE: If I change the width so I can display more text, need to be careful if I’m using an image on the left side of the text. I could also change the font size and padding.

— I can’t really change the Title color, size, etc in the CP like I can the content. However, I should be able to play with the css code for the Title:

div.intro div.text h3 {

color: #ffffff;

font: bold 20px/30px Trebuchet MS, arial, sans-serif; }

NOTE: In the above CSS code the 20px is the font size and the 30px is the line height. If I wanted to put more or less disatance between the title and content, I could change the line height. Basically line height controls the vertical distance between lines, so I got to be careful I don’t crunch the lines together.

————————–

READ MORE BUTTON

————————–

Since I moved the Sign Up image to the top of the page, I wanted to add a Read More link to the text in the hader. This is how I did it:

— In the CP – Content – Pages – Admin – in my custom page called “Welcome to Asian Wife & Asian Dating” I added this CSS at the top (use the HTML button in the editor to add it).

<style type=”text/css”>

.styled-button-1 {

-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 1px 0px 0px;

background-color: #FA2;

border-radius: 5px;

border-bottom-color: #333;

border: none;

border-width: 0;

box-shadow: rgba(0, 0, 0, 0.199219) 0px 1px 0px 0px;

color: #FF33CC;

font-family: ‘Helvetica Neue’, Arial, sans-serif;

font-size: 16px;

font-weight: bold;

height: 32px;

padding: 4px 16px;

text-shadow: #FE6 0px 1px 0px;

margin-left: 550px;

}

</style>

— Next I added the following link to the custom page below the content. Again, I used the html button in the custom page editor:

<a href=”http://www.asian-wife.net/page/admin/welcome-asian-dating/” style=”color: #FF33CC; text-decoration:none; font-size: 16px; “>Read More</a>

12. I wanted to stop members from removing their profile image. They can change it, but I did not want them to delete it. The easy thing to do is just remove the delete button from the template:

Edit ‘templates/your_template/account_photo.tpl’ file and remove the ‘delete’ link.

The delete link looks like this:

<li><a href=”#” onclick=”javascript:confirmLink(‘{lang:”photo”,”delete?”}’, ‘{top.virtual_path}{delete_link}’)” title=”{lang:”photo”,”delete”}”>{lang:”photo”,”delete”}</a></li>

13. I decided to spruce up the Sign Up at the top of the page so after a member logs in, it displayes their username with a background. Here is how:

——————

OPEN: site.css

——————

Add the following CSS code:

div#header a.signup2 {

margin: 40px 30px 0px 0px;

width: 193px;

height: 21px;

float: right;

display: block;

text-decoration: none;

font-size: 18px;

font-weight: bolder;

-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 1px 0px 0px;

background-color: #FA2;

border-radius: 5px;

border-bottom-color: #333;

border: none;

border-width: 0;

box-shadow: rgba(0, 0, 0, 0.199219) 0px 1px 0px 0px;

color: #FF33CC;

font-family: ‘Helvetica Neue’, Arial, sans-serif;

font-size: 16px;

font-weight: bold;

padding: 4px 16px;

text-shadow: #FE6 0px 1px 0px;

text-align: center;

}

——————

OPEN: header.tpl

——————

Change the login link to the following so the userename is trimmed – {trim:session.username,10} – Below is the whole code

<!– IF loggedin == “0” –>

{anchor:url1=”account/register/”,url2=”index.php?m=account_register”,name=”core|menu_register”,pre=”<span>”,pro=”</span>”,class=”signup”}

<!– ELSE –>

<a href=”{virtual_path}account/home/”> Hello {trim:session.username,10}</a>

<div></div>

<!– ENDIF –>

14. ADDING EDIT TO MANAGE PICTURES IN THE CP

OPEN: includes/templates/pictures.tpl

FIND:

<!– BEGIN fields –>

<div style=”text-align:center;float:left;width:120px;margin-bottom:10px;”>

ADD AFTER:

<a href=”{top.virtual_cp_path}index.php?m=memberspictures&p=edit&id={member_id}&aid={album_id}&sid={picture_id}”>Edit</a><br>

NOTE: now I have an Edit link above their picture in Manage Pictures in the CP.

15. ADDING USERNAME TO MANAGE PICTURES

————————

OPEN: cp.pictures.php

————————

FIND: (around line 559):

$result = $DB->query(“SELECT p.*, m.joindate, if(p.totalvotes,p.totalscore/p.totalvotes,0) as averagerating

ADD: m.username

A FEW LINES BELOW FIND:

$fields[$i][‘member_id’] = $obj->member_id;

ADD THIS:

$fields[$i][‘username’] = htmlentities2utf8($obj->username);

—————————————

OPEN: includes/templates/pictures.tpl

—————————————

As you can see in the code below, I added {username} so members username displayed below their image in the CP, Manage Pictures.

<a href=”{top.virtual_cp_path}index.php?m=members&p=edit&id={member_id}”><img src=”{top.virtual_pic_path}{mediapath}{tfilename}” border=”0″ /></a>

<br>{username}

16. Adding group name to include/templates/picture.tpl

————————

OPEN: cp.pictures.php

————————

FIND:

//————————————————

// Get pictures

//————————————————

cHANGE THE QUERY BELOW IT TO ADD group_name:

$result = $DB->query(“SELECT p.*, g.name AS group_name, m.joindate, m.username, if(p.totalvotes,p.totalscore/p.totalvotes,0) as averagerating

FROM ” . DB_PREFIX . “pictures AS p, ” . DB_PREFIX . “members AS m, ” . DB_PREFIX . “members_groups AS g

WHERE p.member_id=m.member_id AND m.group_id=g.group_id ” . ($wherestatus ? ” AND ” . $wherestatus : “”) . ”

ORDER BY $sort $order

LIMIT ” . (($page – 1) * $results) . “, ” . $results);\

———————————–

A few lines down in the Set Values add the following

———————————–

$fields[$i][‘group’] = $obj->group_name;

———————————

OPEN: includes/templates/pictures.tpl

———————————

In includes/templates/pictures.tpl use this call to display group name: {group}

17. Adding group name to include/templates/photos.tpl

————————–

OPEN: cp.photos.php

————————–

FIND:

//————————————————

// Build WHERE clause

//————————————————

$wherestatus = “”;

if ( $status == 1 ) {

$wherestatus = “picture_active=1”;

}

elseif ( $status == 0 ) {

$wherestatus = “picture_active=0”;

}

AFTER ADD:

//————————————————

// Get member groups

//————————————————

$groups = get_members_groups();

FIND:

//————————————————

// Get pictures

//————————————————

$result = $DB->query(“SELECT * FROM ” . DB_PREFIX . “members WHERE picture!=” ” . ($wherestatus ? ” AND ” . $wherestatus : “”) . ”

ORDER BY picture_date $order LIMIT ” . (($page – 1) * $results) . “, ” . $results);

CHANGE TO:

//————————————————

// Get pictures

//————————————————

$result = $DB->query(“SELECT * FROM ” . DB_PREFIX . “members WHERE picture!=” ” . ($wherestatus ? ” AND ” . $wherestatus : “”) . ”

ORDER BY picture_date $order LIMIT ” . (($page – 1) * $results) . “, ” . $results);

FIND:

//————————————————

// Set values

//————————————————

$fields[$i][‘member_id’] = $obj->member_id;

AFTER ADD:

$fields[$i][‘group_id’] = $obj->group_id;

$fields[$i][‘group’] = isset($groups[$obj->group_id]) ? $groups[$obj->group_id] : ‘Unknown’;

————————————-

OPEN: includes/templates/photos.tpl

————————————

Add {group} where you want to display the group name.

18. 2.7 can display more than one type of members on the home page. They use a combination of javascript and css to make it happen. I call the procedure the switch. For example, by default New Members are displayed. Above the New Member images there is a link you can click and it will switch the images according to the CALL (i.e. CALL for Popular or Featured members).

I wanted to add a block of content below the images. The Switch gave me a problem. As I clicked a link (i.e. for Popular members) the block of content would disappear. To make the content appear at all times, no matter which link is clicked, you DO NOT INCLUD <div> in the block.

THIS IS WRONG:

<div>

<div>

the content

</div>

</div>

THIS IS CORRECT:

<div>

the content

</div>

19. In 2.7 they have a sidebar.tpl. I wanted to list some custom pages. The following code shows the CALL and the CSS code I used to display a list of custom pages in the sidebar.

<div>

<h5><span>Articles</span></h5>

<div>

<div>

{pages:limit=100,tag=”articles”,separator=”<br/>”,orderby=”page_id”,orderdir=”desc”}

<div></div>

</div>

</div>

</div>

NOTE: You need to provide the custom pages in the CP with the same custom tag for them to be displayed by the CALL. In this example the tag is articles.

I used several CALLS for pages in 2.5.3 (Ramil did a mod). I’m going to list the CALL here:

{pages:limit=10,tag=”articles”,separator=”<br/>”,orderby=”page_id”,orderdir=”asc”}

{pages:limit=10,tag=”articles”,separator=”<br/>”,orderby=”page_id”,orderdir=”random”}

{pages:limit=10,tag=”articles”,separator=”<br/>”,orderdir=”desc”}

{pages:limit=10,tag=”articles”,separator=”<br/>”,orderby=”page_id”,orderdir=”desc”}

20. I have it setup so when a member signs up, they have to click an activation link in an email sent to them to complete the sign up. I wanted the member to be redirected to a custom page after they clicked the activation link in the email. Here is what I did:

— You change activation redirection link in ‘includes/lib/lib.account_activate.php’ file.

— I want to redirect them to this custom page after the click the activation link: http://www.filipinaeyes.com/online-dating-gallery/page/admin/journey-blog/

OPEN: lib.account_activate.php

FIND: redirect( VIR_PATH . ($PREFS->conf[‘fancy_urls’] ? “account/home/” : “index.php?m=account_home”) );

CHANGE TO: redirect( VIR_PATH . ($PREFS->conf[‘fancy_urls’] ? “page/admin/journey-blog/” : “index.php?m=page/admin/journey-blog”) );

NOTES:

— there is more than one redirect in the template. Make sure you change the first one only.

21. There are times I want to add a link to text in a language file. Because language files are php files, you have to use the escape code to display a link. Here is an example:

FIRST EXAMPLE:

“Please <a href=\”http://www.mysite.com\”>LOG IN</a> to be able to access this page”,

The \ before the first ” and before the last ” escapes the html code from the php code. Of course you will want to substitute the url with the url you want.

Now the words LOG IN will be a link to the url.

SECOND AND THIRD EXAMPLE:

<a href=\”http://www.filipinaeyes.com/online-dating-gallery/account/messages/compose/1/\” target=\”_blank\”>MESSAGE ADMIN</a>

<a href=\”http://www.mysite.com\” target=\”_blank\”>log in</a> (this will open the page in a new window)

22. Blog Pictures. When a member creates a blog, he can upload an image. If they do not upload an image, they none.gif is dispalyed. Instead of the none.gif, the following code will use the member’s image if they do not upload an image with their blog.

Open member_blog_entry.tpl

FIND:

<!– IF entry_picture –>

<a href=”{top.virtual_pic_path}{member_media_path}{entry_picture_large}” id=”blog_picture_{entry_id}” target=”_blank”><img src=”{top.virtual_pic_path}{member_media_path}{entry_picture}” alt=”” border=”0″ /><br/></a>

<div id=”blog_picture_{entry_id}_zoom” style=”display:none”><img src=”{top.virtual_pic_path}{member_media_path}{entry_picture_large}” alt=”” border=”0″ /><br/></div>

AFTER ADD:

<!– ELSEIF member_picture AND member_picture_active –>

<div align=”center”><ahref=”{top.virtual_pic_path}{member_media_path}{member_picture_large}” id=”profile_picture_{member_id}” target=”_blank”><img src=”{top.virtual_pic_path}{member_media_path}{member_picture}” alt=”” border=”0″ /><br></a></div>

<div id=”profile_picture_{member_id}_zoom” style=”display:none”><img src=”{top.virtual_pic_path}{member_media_path}{member_picture_large}” alt=”” border=”0″ /><br></div>

23. Editing from the Front End. There are times when surfing the front end of the site, I wish I could click a link and go directly to that function in the CP. The following coding made that possible for some functions

—————

BLOGS

—————

OPEN: member_blog_entry.tpl

ADD WHERE YOU WANT:

<!– IF session.can_access_cp –>

<a href=”{virtual_cp_path}index.php?m=membersblog&p=edit&id={member_id}&sid={entry_id}” target=”_blank”>Edit blog</a>

<!– ENDIF –>

The IF statement is so only those who have access to the CP will see the link. In my case, I only have one admin, that’s me, that will see the link on the front end when I’m logged in.

——————-

MEMBER PROFILE

——————

Here is what I used when I want to be an edit button in the member’s profile that goes to their account in the CP.

<!– IF session.can_access_cp –>

<a href=”http://www.filipinaeyes.com/cp/index.php?m=members&p=edit&id={member_id}” target=”_blank”>Edit</a>

<!– ENDIF –>

NOTE: I don’t know why I did not sure virtual CP in the above. So be sure to either change the above code with your URL or use {virtual_cp_path}

——————-

VIDEO

——————-

There at times I’m surfing the front end and notice that one of the members youtube video is no longer being displayed. This link takes me to their video in the CP

<!– IF session.can_access_cp –>

<a href=”{virtual_cp_path}index.php?m=membersvideos&p= manage&id={member_id}” target=”_blank”>Edit blog</a>

<!– ENDIF –>

——————-

THEORY

——————-

In theory you could go on and on and add links to the front end that takes you to that function in the CP for many thinigs. They key is where you place it. For example, placing an edit link for video in a blog template probably wouldn’t work.

24. MINIMUM WORDS IN BLOG

Man, I don’t like two word blogs. These changes are so members have to type a minimum words before they can save the blog

OPEN lib.account_blog.php

FIND:

elseif (strlen($body) > $PREFS->conf[‘blog_max_length’])

{

$TEMPLATE->set_message(“error”, (str_replace(“%max%”, $PREFS->conf[‘blog_max_length’], $LANG[‘blog’][‘body_too_long’])), 0, 0);

return 0;

}

AFTER ADD:

elseif (str_word_count($body) < 15)

{

$TEMPLATE->set_message(“error”, (str_replace(“%max%”, 15, $LANG[‘blog’][‘body_too_short’])), 0, 0);

return 0;

}

NOTE: above change the number 15 (two places) to the minimum words you want

OPEN: /includes/languages/english/lang.lib.account_blog.php

ADD:

// minimum characters for blog

“body_too_short” =>

“Your blog needs to contain at least %max% words. If you want to do a short message, update your My Status”,

25. JQUERY AND CUSTOM PAGES.

You can add a jquery plugin directly in a custom page without having to add it to the header.tpl. Same with CSS and Flash. This is good because you don’t have to load your header up with a lot of jquery plugins. Intead, add the plugin directly to the custom page. I guess an exmaple will explain best.

This custom page uses a jquery plugin (put your mouse on the image wall and it will move). The plugin was added directly to the custom page in the CP, not to the header.tpl

http://www.filipinaeyes.com/page/admin/asian-couples/

This should excite vldp users because you can now add some neat features via your custom pages without loading up your head tag up with tons of plugins. There are too many great jquery plugins out there to mention but google it and you will find them. For example if you wanted to add a jquery youtube audio or video player to a custom page, there are jquery plugins that can handle that with no problem.

[h]MY MOD NOTES:[/h]

I had a ton of mods for 2.5.3. Most were done by Ramil. In some cases I could add a 2.5.3 mod to 2.7 but in most cases I could not. The coding between 2.5.3 and 2.7 was too different for me to know how to add some mods. Not sure this will help anyone, but many got the same mods I did from Ramil so if it helps, so be it.

You can ignore the numbering system in the parenthsis. It is there for my purpose.

1. Global Picture Filter for Gender (#4). This was a mod that Ramil did for 2.5.3 so I could sort the images by gender in the global picture gallery (this should be a regular feature of vldP). For 2.7 Ramil made some changes so it would work. If you have this mod for 2.5.3, it won’t work as is for 2.7.

The files Ramil had to change in 2.7 were: lib.pictures.php and picture_sidebar.tpl

2. fpoll mod (#8). This is nothing more than a flash poll in custom page. I purchased the poll software but now you can get it for FREE. It really isn’t a mod but in case anyone is interested you can look at an example at:

http://www.filipinaeyes.com/page/polls/filipina-looks/

3. This is a free mod by Ramil. The only change I had to make was to use BBCode instead of HTML. One thing you need to do bedore using this mod is addding the BBCode for images. See above #9 for BBCode.

4. Ramil did a mod for me that when I approve a members picture it sends them an email (#10). To get it to work for 2.7 had to make changes to cp.pictures.php

5. Blog Comment Mod (#16). This mod allows me to display the blog comments in a CALL wherevere I want on the site. Another mod done by Ramil. The two 2.5.3 files that were created had to be tweaked to work for 2.7. Those files were: ext.lb_comments.php and ext.lb_comments.tpl

6**. Showing how many comments a page has (#28). This mod did a lot more than showing page comments, but that is the only thing I was interested in for 2.7. A lot of the features that 2.7 has now, were not part of 2.5.3. This mod brought the 2.5.3 up to date for custom pages. The only thing I wanted from this mod was to display how many comments there were for a page. The file I I tweaked for 2.7 was: ext.pages.php (note: there still may be a slight error even though it works — may have to ask Ramil). NOTE: I removed the mod but still got the error when I made changes to a custom page comment and hit submit.

7. Previous and Next Blog (#29). This was a free mod by Ramil. I think it is still on vldCrowd. One file involved: ext.blog_link.php. It worked as is for 2.7 — I could use the same CALL is used in 2.5.3

8. Birthday Mod from Ramil (#30). Another freebie from Ramil. It needed to be tweaked to work for 2.7. You will find the mod and tweak on vldCrowd.

9. Edit Blog from Front end (#34). See #23 above.

10. Mod to prevent members from deleting all images from their gallery (#36). Just like I don’t want members to delete their profile image, I don’t want members to delte all images from their gallery. This mod prevents them from doing so. Another freebie from Ramil. The only file involved was lib.account_pictures.php. Works as is for 2.7

11**. Mass move Group from the CP (#37). There are times I want to move a group in Mass to another group. This mod makes it possible. It is a paid mod from Ramil. Two files involved: includes/cp/cp.members.php and includes/templates/members.tpl

12. Ramil also did a mod for me so I go directly to Manage Members in the CP, instead of the dashboard when I click the Control Panel link on the front end.

VldMods

About the Author: gugu

Hey ... I´m the owner of this site ;) If you need help customize your vldpersonals site. Please ask me and I will try to help you. Enjoy reading !

3 Comments + Add Comment

  • I like it whenever people come together and share thoughts.
    Great blog, keep it up!

    Like or Dislike: Thumb up 0 Thumb down 0

  • Hello, I just dropped by to look at this site. It appears really good and I enjoyed viewing it, thanks for the good
    stuff!

    Like or Dislike: Thumb up 0 Thumb down 0

  • I blog quite often and I really appreciate your information.
    This article has really peaked my interest. I’m going to book mark your
    website and keep checking for new details about once a week.
    I subscribed to your Feed too.

    Like or Dislike: Thumb up 0 Thumb down 0

Clients Testimonials

Peter
Thanks for your help and a great support my site works fine now ... no matter how often I had ask for your support you have kindly answered all of my questions ... I recommend you. I vote 5 stars for you. 5 of 5 stars

Peter

About VldMods

Welcome to vldMods here we will try to connect all free and pay mods for vldpersonals 2.5.3 and newer.

You can now translate VldMods in 50 different languages.

Translate a post then you Continue Reading »

Add your vldpersonals site here.

Sponsor/Donate to VldMods

I hope you like VldMods if you sponsor me I can make it even better ;) Thanks.

Find Us On Facebook

VldMods Newsletter

Subscribe to VldMods Newsletter a confirmation email will be sent to you!
This is a good way to be informed about our tutorials and news.

VldMods Polls

Do You Like My Site?